Solved

xaml PushPinItems

Posted on 2013-01-15
5
479 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
  • 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

867 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now