Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

google-maps kml, how to label a line string?

I have a website that displays kml Line Strings as bike routes on google-maps.

I would like to label the routes but have not been able to do so.
I have not been able to add a bubble to the Line String. I put a Placemark along the route, and it shows up as an icon but i could not find a way to put a label on them. I could not change the icon to a png icon with the text I need.

I have been trying different things, generally looking at these documents but just trying a lot of different things.

https://developers.google.com/kml/documentation/mapsSupport

https://developers.google.com/kml/documentation/kmlelementsinmaps

I don't know for sure if it is just not possible or if I am doing something wrong.

The only thing I can think of is to draw a Line String in Google Earth in the shape of the characters I need for my label, in the location I want to display it, but that seems silly, it should be easier than that.

Has anyone been able to add labels in a kml file for display in google-map API 3?

like image 514
skyl4rk Avatar asked Apr 23 '12 00:04

skyl4rk


1 Answers

If I understand your question, I believe it has already been asked here. Also, in your question you talk about changing a Placemark icon and there is a different answer that I believe addresses that part of your question. Hope this helps -

like image 182
Sean Mickey Avatar answered Dec 23 '22 00:12

Sean Mickey