How to administer PushPin location

Jun 18, 2010 at 10:08 AM

Dear all,

I was wondering how you are handling the administration part of your pushpin location :

Are you storing all GPS coordinate in a database or other stuff ?

I am doing some Surface developpement and if some of you have seen the Concierge application, to store the location of your new point of interest you simply position it in the map and bing automatically store the coordinate in database. Does this approach is possible here ?

How you guys are doing ?

Thnaks for help


Jun 21, 2010 at 4:20 PM

Once you have the data, such as latitude and longitude, you'll just have to store the data in any place that makes sense. For example, a CSV file or a SQL database. You can use standard data access techniques to do this.

In the interface to InfoStrat.VE, you should load the data from your data source into a class that implement INotifyPropertyChanged for each of the properties that you want to expose to the interface. Then group those into an ObservableCollection<>and set the itemssource of the map to that collection.

If you look at the DataBindingSample from the latest source code drop (on the source code tab) it shows how to do this. You can take the InitData() method in the DataModel class and read from your database instead.

Jun 21, 2010 at 4:38 PM
Thnaks for your reply. My scenario is that I need to be able to display restaurant in an area or cash machine for instance. So I have in this sample 2 type of pushpin (Restaurant + Cash machine) To retrive location I have seen that the Bing web service is capable to retrieve automatically Lat and Long base on an adress. Then storing those adress in a local db or xml file for instance will just improve performance in order to avoid calling back again the service right ? So do I have to call from my own code the web service to retrive Alt and Long and storing it in my side or does your control embeded this already ? What I mean is that is it enough from my side to have a Adress table with State, Street, POstal code, with NULL fields ALT and LONG and then call the bing web service to retrive ALT and LONG based on each adress in my DB, then update ALT and LONG... or do I have to set them manually in my database ? What is best for your control to work nicely ? thnaks for help regards serge
Jun 21, 2010 at 4:59 PM


Yes, caching the results would improve performance.

This control does not do any of the lat/long lookup so you need to handle that in your code. The PushPins need latitude and longitude so do whatever you need to do to get those, then expose those properties (like the DataBindingSample) and bind them to the map's ItemsSource.


Jun 21, 2010 at 5:14 PM

Thats more clear for me Johsh now.