Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
115
Example using MVVM
posted

Hello.  Are any examples available for setting the xamMap mapLayer shapefile source as well as defining the projection coordinates using the MVVM pattern?  Rather than setting these values in the XAML or view I'd like to set them in the viewModel.

 <igMap:MapLayer Brushes="#661E90FF"> <igMap:MapLayer.Reader> <igMap:ShapeFileReader Uri="c:\shapefile\district"> <igMap:ShapeFileReader.CoordinateSystem> <igMap:CoordinateSystem  FalseEasting="1000000" FalseNorthing="1000000" > <igMap:CoordinateSystem.Projection> <igMap:LambertConformalConic EllipsoidType="GRS1980"  CentralMeridian="-100" StandardParallelNorth="27.41" StandardParallelSouth="34.91"  LatitudeOrigin="31.16"  /> </igMap:CoordinateSystem> </igMap:ShapeFileReader.CoordinateSystem> </igMap:ShapeFileReader> </igMap:MapLayer>

Thanks.

Parents
  • 30945
    Offline posted

    Hello,

     

    Thank you for your post. I have been looking into it and I have created a sample application for you, that shows how you can use binding to implement the XamMap’s ShapefileReader. I have created an instance of the ViewModel in the Resources of the XamMap’s parent and use it as a Source   of the binding, since the ShapefileReader class, does not derive from FrameworkElement and does not supports DataContext.

     

    Please let me know if you need any further assistance on the matter.

     

    Sincerely,

    Krasimir

    Developer Support Engineer

    Infragistics

    www.infragistics.com/support

    Map_MVVM.zip
Reply Children
No Data