Adding hundreds of pushpins programmatically to bing cards freeze WP7 interface

I am working on a WP7 application that uses bing cards to display ~ 600 pushpins. When I add them to the map using map.Children.Add (pushpin), the user interface freezes for ~ 200 ms. I saw that in silverlight you can use Microsoft.Maps.EntityCollection to add pins to the map, but unfortunately I could not find how to use the assembly on WP7. Does anyone know about this solution?

+3
source share
2 answers

Perhaps you are considering the problem incorrectly. WP7 is compact (albeit powerful), which differs in that it shows the user what they want to know quickly (when applications are written correctly).

The user cannot see 600 pushpins at a time on a small device, so why not just show them the buttons that are in the visibility area (or next to it) and add buttons when the user clicks on the map

Alternatively, you can “leak out” by submitting buttons, adding them one (or more) at a time with the help DispatcherTimer, so that the user gradually adds pushpins without a significant impact on performance.

( ) MapItemsControl DataTemplate Pushpin pushpin. ObservableCollection, "", , .

+10

, Derek's, , 600 . , , , .

, , Presto! .

, , , , , , . , , , "?". , , Google - .

, - . MapLayer, .

+1

All Articles