Solved

xaml PushPinItems

Posted on 2013-01-15
5
485 Views
Last Modified: 2013-01-24
Hello

Very new to xaml (possibly even missing the point completely!)

I believe the MapItemsControl is the way to go for data bound map overlays in Bing Maps.  The only example I can find is the snippet below.

Can someone explain what is happening here (especially the binding term)
Why do the examples use xaml ?  All those closing tags are so confusing.  Can someone vb.net it for me ?

<my:MapItemsControl x:Name="PushpinItems" Height="300">

            <my:MapItemsControl.ItemTemplate>

                <DataTemplate>

                    <my:Pushpin Location="{Binding Location}" >

                    </my:Pushpin>

                </DataTemplate>

            </my:MapItemsControl.ItemTemplate>

        </my:MapItemsControl>

Open in new window

0
Comment
Question by:Dodsworth
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 9

Expert Comment

by:sognoct
ID: 38779279
example uses xaml because bing maps in wcf uses xaml for designer. You can define all parameter by xaml properties, like center of the map, graphic templates and so on.

The binding part defines how the pin are bound to the collection of data, that usually is an observable collection of objects. In this case it is bound to the property "location"

so you have a service that returns an observable collection of a certain class that contains a property location

I've found a full simple example (that uses xml data, maybe can be more familiar) of bound pushpin

http://beyondrelational.com/modules/2/blogs/433/posts/12005/bing-maps-binding-xml-data-source.aspx

another example (with pushpin bound to list / observable collection) :
http://beyondrelational.com/modules/2/blogs/433/posts/12005/bing-maps-binding-xml-data-source.aspxhttp://beyondrelational.com/modules/2/blogs/433/posts/12005/bing-maps-binding-xml-data-source.aspx

but ... if you are looking for an easier solution, just add pushpin to map without binding them.
0
 
LVL 1

Author Comment

by:Dodsworth
ID: 38781881
ok.   I need to bind to a datasource using vb.net.
0
 
LVL 9

Expert Comment

by:sognoct
ID: 38782125
my favorite example :

http://www.microsoft.com/maps/isdk/silverlight/#MapControlInteractiveSdk.Tutorials.DataBinding.TutorialMapItemsControl

this is a site of bingmaps with interactive code and samples
0
 
LVL 1

Author Comment

by:Dodsworth
ID: 38782291
good but no VB :(
0
 
LVL 9

Accepted Solution

by:
sognoct earned 500 total points
ID: 38786660
here is an example
silverlightexample.zip
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question