on 03-17-2015 5:36 AM
Hello,
I am trying to integrate HTML viewer. I am able to successfully integrate the vds file on HTML viewer.
I am using following code.
<script src="resources/sap/ve/js/Loco.js" type="text/javascript"></script>
<script src="resources/sap/ve/js/dvl.js" type="text/javascript"></script>
var url = url of vds file;
var oDvl = new Dvl.Create("canvas", true, {configureCanvas: true, totalMemory: 268435456 });
oDvl.Helpers.SetVideoMode(768, 512); //Creates WebGL context and sets the width & height
oDvl.CreateCoreInstance(); //Create an instance of the DVL Core
oDvl.Settings.MajorVersion = oDvl.Core.GetMajorVersion(); //Get the major version of Core
oDvl.Settings.MinorVersion = oDvl.Core.GetMinorVersion(); //Get the minor version of core
oDvl.Core.Init(oDvl.Settings.MajorVersion, oDvl.Settings.MinorVersion);
oDvl.Helpers.LoadFile(url, null,
//code to load file
}
Above code is rendering the file, but Zoom and Pan Functionality are not working,
Could you please provide suggestions to enable Zoom and Pan functions.
Best Regards,
Rajesh
Hi Jeff
Not sure if you've fixed this since it's a few months old. But...
From what I can see you have included the Loco library but you haven't hooked it up yet. You need to create a Loco object, passing in the DVL object and its canvas.
eg
oDvl = Dvl.Create(...);
var track = new sap.ve.Loco(oDvl, oDvl.canvas, false/*logging*/);
That should be all you need to do.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.