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
2085
xamGeographicMap Performance with Hidden Series
posted

I have loaded a very large (.shp = 45MB, .dbf = 130MB) shapefile set as PolyLine series and added it to the xamGeographicMap series list.  It takes a significant amount of time to zoom in on the map, so I use a checkbox to flip the visibility property of the series from visible to hidden so the user can zoom in further before turning on this layer/series.  If this series added to the xamGeoMap but set as hidden, it still takes about the same amount of time to zoom it.  It seems the map is doing something behind the scenes with this series even though it will not be displayed.

Can you give me an idea of what I can to do increase the performance of the xamGeoMap when series are not visible?

Attached is the code I am using to test this without the shapefile set - in this example I just manually change the visibility of the series in the XAML code for testing.

GeoMapPerfTest.zip
Parents
No Data
Reply
  • 34510
    Verified Answer
    Offline posted

    Hi Gary,

    The performance issues you are seeing are due to there being too many items in the WPF Visual Tree.  You are probably zoomed all the way out when the application starts which means you see every polyline that the shapefile has to offer.  There are a few ways you can deal with this though.  First, instead of setting the Visibility to Hidden, use Collapsed.  Hidden does not remove the elements from the Visual Tree but Collapsed does.  Your next option is to set the VisibleFromScale property.  This property allows you to determine when the series should be shown depending on the zoom level.  For example, you may not want to show the series when you are fully zoomed out but after the user zooms in past a certain point, the series will pop into view.  The geo map control performs culling on the polylines so any that are out of view will not be present in the Visual Tree.  Since you already have the Checkbox setup to hide the series, I would first try setting it to Collapsed rather than Hidden.  You should see an improvement.

Children