I noticed that when I add a ScaleBarAdornmentLayer, the panning slows down considerably. Is there something I need to add? FYI, background map is a GoogleMapsLayer. Here is my code:
ScaleBarAdornmentLayer scale = new ScaleBarAdornmentLayer();
scale.Location = AdornmentLocation.LowerLeft;
m_Map.AdornmentOverlay.Layers.Add(scale);
ScaleBar
Hi Ryan,
Thanks for your post, we tried to recreate the problem, but it didn't show up, following is our test result(we tested five times):
with scale(ms): 8242 8340 8139 7620 7919
without scale(ms): 7697 8113 9386 7680 7862
Attached is our test code, would you please check it and tell us what we missed?
Waiting for your further information
Summer
001_Post11391.txt (1.27 KB)
I tried your example. Removed all my setup code and inserted your code. The code I used is below. I’m still getting identical behaviour as before, a very noticeable delay in panning. When I comment out the scalebar code it works fine.
m_Map.MapUnit = GeographyUnit.Meter;
m_Map.CurrentExtent = new RectangleShape(-2500000, 2500000, 2500000, -2500000);
m_Map.ZoomLevelSet = new OpenStreetMapsZoomLevelSet();
LayerOverlay ov = new LayerOverlay();
ov.Layers.Add(new GoogleMapsLayer());
//ov.Drawing += new System.EventHandler<DrawingOverlayEventArgs>(ov_Drawing);
//ov.Drawn += new System.EventHandler<DrawnOverlayEventArgs>(ov_Drawn);
ScaleBarAdornmentLayer scale = new ScaleBarAdornmentLayer();
scale.Location = AdornmentLocation.LowerLeft;
m_Map.AdornmentOverlay.Layers.Add(scale);
m_Map.Overlays.Add(“ov”, ov);
m_Map.Refresh();
Hi Ryan,
Thanks for your further information, Our code is tested with the latest version of dlls(7.0.23.0), would you please get 7.0.23.0 and try it again, you could get it from you customer portal: helpdesk.thinkgeo.com/login/?ReturnUrl=%2F
If the problem is still there, would you please tell us your culture info, OS for a further test?
Waiting for your further information
Summer
I grabbed version 7.0.31. I have the same issue.
I’m running Windows 7, Visual Studio 2010, .NET Framework 4. I’ve tried debug and release modes.
Hi Ryan,
Sorry for the inconvenience, but I am sorry to say that we tested the exact code with yours on a pure virtual machine(win 7, .net 4), but the problem still didn’t show up, following is a captured video of our test, would you please check it: screencast.com/t/5VZra1oKtoJ3 . If possible, would you please send us a small “self-contained” sample to recreate it?
Waiting for your further information.
Best Regards
Summer
It was a little difficult to tell from the video. I’ve attached a project that should show the problem. Without the scalebar layer, it pans smoothly as you drag the mouse. With the scalebar, there is a delay between mouse drag and pan.
002_001_ScaleBarTest.zip (58.1 KB)
Hi Ryan,
Thanks for your sample and sorry for misunderstanding the problem, at first I thougth the problem is the rendering speed difference between with scalebar and without scalebar, but now I have understand your problem which is the pan delay with scale bar, this problem is a little complex and will need a little bit time to sort it out, would you please wait a little while for it? Any thing new will be updated here immediately.
Best Regards
Summer
Hi Ryan,
Would you please try the attached sample, it should work now.
Hope it helps
Summer
003_002_001_ScaleBarTest.zip (8.53 KB)
It works. Thanks!
Hi Ryan,
You are welcome. If any other questions, please feel free to let us know.
Thanks,
Johnny