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
Solved

xaml PushPinItems

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

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MailAddress in vb 4 29
ASP.NET (VB) return a record 2 35
VS 2017 18 30
how to just get time from a date 6 31
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

789 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