ThinkGeo.com    |     Documentation    |     Premium Support

Mouse Pan and Zoom doesn't work when MapUnit set to DecimalDegree

 


I have noticed an interesting WpfMap behavior for GoogleMapsOverlay. The mouse pan and zoom features doesn't seem to work when the map unit is set to decimal degree (else works fine in meter unit).


 


If the map unit is set to DecimalDegree:



        
  • When you pan around the map, it will undo the pan itself and centre the map to it's default centre location. 

  •     
  • When you zoom in the map, the map will zoom in from on the default centre location. 


CenterAt property doesn't seems to be updated when user panning or zoom in/out the map. 


 



wpfMap1.MapUnit = GeographyUnit.DecimalDegree;


wpfMap1.BackgroundOverlay.BackgroundBrush = new GeoSolidBrush(GeoColor.GeographicColors.ShallowOcean);


GoogleMapsOverlay googleMapOverlay = new GoogleMapsOverlay();


wpfMap1.Overlays.Add(googleMapOverlay);


wpfMap1.CurrentScale = 100000000;


wpfMap1.Refresh();


 



Please look into the attached MS WPF application project, contains two WPF windows (GoogleMapsOverlay_DecimalDegree and GoogleMapsOverlay_Meter). Notice that the mouse panning is not working in GoogleMapsOverlay_DecimalDegree  window. Notice the only difference between the two windows is the MapUnit. 


 


Can anyone please confirm this?



1967-GoogleMapsOverlay.zip (15.4 KB)

Mike,


Thanks for your post and welcome you to ThinkGeo Desktop discussion forum.
 
I think when you use the GoogleMapsOverlay, the mapUnit is expected to be in Meter instead of DecimailDegree, if you want to add data in DecimalDegree, probably a projection from DecimalDegree to GoogleMap projection need to be attached to the layer.



 
If you set the MapUnit to DecimailDegree instead of Meter, then the scale cannot be calculated correctly.
 
Any more questions just feel free to let me know.


Thanks.
 
Yale