Hi,
I need to map a substantial number of elements on a map (ie approx 50,000). Although this works, it's obviously very slow.
Instead I've developed a system which will create an image, and place dots on the image in the relevant location based on lat/long. I can then overlay this transparent image over the map.
This works fine if I have the map set to a default zoom, however as soon as I zoom in or out, the image overlayed resizes, so then all my points are out of position.
How do I change this so effectively it works in the same way as the map background, ie so when I zoom in or out, my image zooms accordingly?
Currently I'm just adding the image as an element to the map;
Dim origin As Point = MapTest.MapProjection.ProjectToMap(New Point(0,0)) 'Add image to centre Dim element As New SymbolElement() element.SymbolOrigin = origin element.Caption = "MyImage" element.SymbolType = MapSymbolType.None element.IsClickable = True element.Value = 1 --use first image from the layer MapTest.Layers("symbolLayer").Elements.Add(element) Dim worldRect As Rect = MapTest.Layers("symbolLayer").WorldRect worldRect.Union(element.WorldRect) MapTest.Layers("symbolLayer").WorldRect = worldRectThe front end has the following layer, with the image built in; <ig:MapLayer x:Name="symbolLayer"> <ig:MapLayer.ValueTemplate> <DataTemplate> <Image Width="3000" Height="2000" Source="i/MyPointsLayer.png" /> </DataTemplate> </ig:MapLayer.ValueTemplate> </ig:MapLayer>Any help appreciated.
Apologies all, as usual I'd moved on to other things and forgotten to upload the code!
There's quite a bit of code so I'll try and get it all split out and uploaded somewhere in the next couple of weeks.
Dale.
Yeah, I'm interested in this application too!
please post it online!
Any news on this yet?
Thanks in advance!
Hi dalereed,
I'm interested in your sample application and seeing how you solved the issue!
Can you put the sample online?
Many thanks!
Hello,
I have been following this thread and am really glad to hear you got this working. I suppose the difference in performance comes from the ability to interact with the map elements unlike the image points you are going to lay over map. However, I think such a sample would be a really useful for anyone who wants to overlay the map with a projecting image.
Looking forward to looking into your approach.
Sincerely,
Petar, MCTS
Developer Support Engineer
Infragistics
www.infragistics.com/support