Posts: 19
Threads: 6
Joined: Oct 2011
Reputation:
0
I am using code from the example you created for panning and zooming to a specific object which works fine when you are zoomed all the way out. Once you are zoomed in or panned at all, the method does not do anything. I tested to make sure it wasn't the values I was giving it, which were the same whether it was zoomed in or not. I haven't been able to test using the example you posted because I get errors when trying to run it.
Posts: 738
Threads: 8
Joined: Sep 2009
Reputation:
45
The sample works great on my machine.
Can you please place a breakpoint to the call to SetZoom method and write me some more details about the parameters values that are used to call the method.
Andrej Benedik
Posts: 19
Threads: 6
Joined: Oct 2011
Reputation:
0
I tried putting your sample code into the sample project and running it to see if it had anything to do with my code, but I could not get it to run. Can you send me your copy of the updated sample project with the zoom to object feature in it?
In my project, here is the first call to setzoom:
SitePlanViewer.SetZoom(centerPosition, ZoomPanel.CenterPositionUnitsType.Absolute, zoomFactor, rotationAngle);
centerPosition: {1111.609375,1929.80932617188}
zoomFactor: 21.631487461222033
rotationAngle: 159.6432
That call works fine. The second call occurs after i select the object next to it:
centerPosition: {1059.41201782227,1911.49597167969}
zoomFactor: 21.504309541034498
rotationAngle: 161.7519
This one seems to have no effect at all.
Posts: 19
Threads: 6
Joined: Oct 2011
Reputation:
0
I created a new project, referenced ZoomPanel, copied the sample verbatim and only changed the code sample from a page to window and ran it. It came up with the error on startup "'NaN,NaN,1,1' is not a valid value for property 'Viewbox'." at the same time that the evaluation warning window appears. Could the evaluation copy have anything to do with it?