This project is read-only.

Add text to marker after using Geolocation

Dec 1, 2010 at 5:34 AM


I'm using geolocation to add a market based on an address (and it's working perfectly!).

However, i also want to be able to have text on the marker. So, if i click on the marker on the map i want it to say a string. I didn't see a way to do this in the samples (only if i'm inputing a latitude/longitude). Is there any way to do this? Can someone post the sample code?


Thanks a lot!

Dec 8, 2010 at 3:00 AM

can someone please tell me what is going wrong here? the marker appears, but when i click it no infowindow appears


            GoogleMarker a = new GoogleMarker(address);
            a.Text = "asdf";

Dec 8, 2010 at 9:36 AM

try this

a.Clickable = true;

Dec 8, 2010 at 3:39 PM

I had no problem with the code you showed in 4.1, but in 5.0 the Text option no longer works in the same way. I have not yet figured out to get a text window to display in 5.0. I find that I can attach my string to marker.title instead and that works as expected allowing me to view the string when I hover the mouse over the marker. I have noticed there is a another Text option in the new GoogleMarkerStyle property and am wondering how it figures into this.