In my project,I need to binding map dynamically.As I know,in Esri,it can be done like this:
< esri:MapView x:Name="CADMapView"<esri:mapview x:name="CADMapView">
Grid.Column="3"
Map="{Binding CADMap}"
MaximumExtent="{Binding ExtentViewModel.MaximumExtent}"
WrapAround="False"/>
But in ThinkGeo,there is no container for map.How to solve it?
</esri:mapview>
How to binding Map dynamically
Hi Channing,
We can create a viewmodel to include the map instance and then bind it in Xaml, please check the attached sample.
Any questions, please feel free to let us know.
Thanks,
Troy
001_WPFDisplayASimpleMap.zip (10.3 KB)
Hi Troy,
Thanks for your reply!
But,I need to use overlays and layers of the map in the constructor of MapViewModel.In your demo,the TGMap is initialized
after loaded,so when instantiating the MapViewModel,the TGMap is a blank map.What can i do?
Thanks a million!
Hi Troy,
Thanks for your reply!
But,I need to use overlays and layers of the map in the constructor of MapViewModel.In your demo,the TGMap is initialized
after loaded,so when instantiating the MapViewModel,the TGMap is a blank map.What can i do?
Thanks a million!
Hi Channing,
Sorry I didn’t get your questions very clearly, would you please let us know more?
Thanks,
Troy