0

I'm new to C# and am working on a Windows Store App that lets a user tap locations on a map to place a marker, save a title and a description for that location. I found the overlayItem class for Android is similar to what I need for my app as it includes a Geopoint and 2 Strings for each overlayItem. I have searched for C# examples to use in my app already but end up going in circles, so I was just wondering if there is a class out there already that may be suitable, or whether it would be better to make my own?
I was thinking something along the lines of this and to make my own get and set methods:

class windowsOverlayItem{
Location loc;
String title;
String description;
Pushpin pin;
}

I've found a few map examples but none that really go to any depth. Any help would be great! Thanks in advance!

2 Answers 2

1

The Bing Maps C# Pushpin Sample implements exactly that. Take a look at its code for more details.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for your answer Mike. That pushpin sample was the one I was going by mostly. So far my app places a pushpin in my current location and when I tap it, a dialog box shows "you are here". I can also click anywhere on the map and more markers will be placed in these locations. What I'm really stuck on is the best way to click a location, have some sort of text input box for the user to enter details about that location and place a pushpin, so that when the pushpin clicked again it will display the details entered previously. I can post the main part of my code if that would help?
0

I finally figured out, that tag and name can be used for the info I need to save for each pushpin along with the location. Here's a short example of when I want to add a new Pushpin to my map and save some details to it.

MyMap.Children.Add(newpin);
MapLayer.SetPosition(newpin, loc);
newpin.Name = title;
newpin.Tag = newpin.Tag as String;
newpin.Tag = description;

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.