I am using the XamGeographicControl. I load a series of about 8000 points and have a DataTrigger to map or hide select points based on a binary flag found in each point.
As i set the flag for points, some of them appear and others do not.
Now, without changing the flags, if i zoom then some points seems to disappear and reappear as i zoom the map.
I am wondering if there is something going on within the control to perhaps optimize the data in some way, that results in this.
For example perhaps if there are two points in the same place, could the points i wish to see but cannot - perhaps they are optimized out - while another point i wish to hide is over top.
It seems random which points are shown. Maybe when points are close together the control drops one?
You used VS 2012, i have only VS2010. Trying to look at sample anyhow.
Hi,
3.) I'm glad simplifying the marker template as resulted in better performance for you.
2.) I've attached a sample that demonstrates a method for determining when the series has finished loading. There are no events that directly do this so this should be used as a workaround. Built-in events for this would be a new product idea. You can suggest new product ideas for future versions (or vote for existing ones) at http://ideas.infragistics.com.
There are many benefits to submitting a product idea:
- Direct communication with our product management team regarding your product idea.
- Notifications whenever new information regarding your idea becomes available.
- Ability to vote on your favorite product ideas to let us know which ones are the most important to you. You will have ten votes for this and can change which ideas you are voting for at any time.
- Allow you to shape the future of our products by requesting new controls and products altogether.
- You and other developers can discuss existing product ideas with members of our Product Management team.
Let me know if you have any questions on this.
3) This simplification has resulted in significant improvement.
<Rectangle Width="4" Height="4" Fill="Blue"/>
2)
Would still like to figure out a way to detect when the map has finished loading these points to display a 'loading' indicator for the user. Examples i have found relate to shapefiles and do not apply to what i am doing here.
1)
http://ko.infragistics.com/community/forums/t/70003.aspx Using DataTrigger for seeting GeographicSymbolSeries MarkerTemplate
So i am using code along these lines to selectively display points. If i de-select all points then when i select a single point, it is not displayed. You must hunt around in the 8000 to find one of the 400 lucky ones that get displayed.
Performance of the map has become very very slow to load or refresh with 4000 points.
I tried to put an indicator for the user while data is loading similar to another example. I have not yet found an event i can use to detect when the map is ready to view again so i can disable this indicator.
<Grid x:Name="MapLoadingContainer" Margin="0" Background="White" Canvas.ZIndex="1" Visibility="Collapsed" VerticalAlignment="Stretch"> <Border Background="Transparent" Opacity="0.7" CornerRadius="3" /> <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Orientation="Horizontal"> <TextBlock x:Name="MapLoadingStatus" FontSize="15" HorizontalAlignment="Center" VerticalAlignment="Center" Text="..." /> </StackPanel> </Grid>
3)
As far as the marker template i was using this all along. If you know of a more 'lightweight' marker that would be good to know.
<Ellipse Width="5" Height="5" Fill="{StaticResource StandardBackground}" Stroke="{StaticResource StandardStroke}" StrokeThickness="0.5" />
Hi OttawaDeveloper,
When you are fully zoomed out, all 8000 of your points are in view and since the MaximumMarkers property was set to 400, there should only have been 400 markers actually visible. Since there are more points than the number of markers allowed, the series chooses a set of markers it thinks best represents your data. As you zoom in, some of those 8000 points move out of view so the series ends up changing the representative markers around to accomodate the change. This can cause points to appears as though they are disappearing.
Since you changed the MaximumMarkers to 8000 you are now getting a 1 to 1 representation of your data points. As you noticed though, this had an affect on performance in your chart since now there are many more markers being created and rendered. You can try supplying your own MarkerTemplate with a more lightweight marker (fewer visual tree elements) to help improve performance.