Multiple lines for placemark label

3,100 views
Skip to first unread message

Albert Steiner

unread,
Feb 27, 2010, 11:57:03 AM2/27/10
to KML Developer Support - Getting Started with KML
Hi there
Is there an easy way to tell kml that I want to have a placemark
label
on multiple lines? Could you provide a simple code example?
Any support is very much appreciated!
Thanks, Albert

ShawnsSpace

unread,
Mar 1, 2010, 5:47:43 PM3/1/10
to KML Developer Support - Getting Started with KML
Hi albert, first im just a little confused by what you are asking
for. You can add placemarks to your kml using maps.google.com and
exporting or using google earth, if you are wanting to add the code to
the raw kml or kmz by hand there alot of interesting read on the api
site.

http://code.google.com/apis/kml/documentation/kmlreference.html#icon

http://code.google.com/apis/kml/documentation/kmlreference.html#iconstyle

personally i instert all my icons polys and code using google earth
and export the kmz file for use

sample: http://shawnsspace.com/Maps/Default.aspx

If there is a certain way you are hoping to do this please be more
specific with your post and i will be happy to assist in any way i
can. :)

Albert Steiner

unread,
Mar 2, 2010, 7:45:57 AM3/2/10
to KML Developer Support - Getting Started with KML
Dear Shawn

Yes, maybe it was not clear enough :-). So, here is an example:

My goal is, to get a lengthy text of a placemark (i.e., its name)
displayed on two lines as follows:

This is a simple example
of a placemark label

So I am looking for a hint to correct/extend the following code I used
so far, which, of course only displays the text on one line:
==
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Placemark>
<name>This is a simple example of a placemark label</name>
<Point>
<coordinates>-122.0822035425683,37.62228990140251,0</
coordinates>
</Point>
</Placemark>
</kml>
==

Hope it is more obvious now. Thanks for any further help!!
Regards, Albert

On Mar 1, 11:47 pm, ShawnsSpace wrote:
> Hi albert, first im just a little confused by what you are asking
> for.  You can add placemarks to your kml using maps.google.com and
> exporting or using google earth, if you are wanting to add the code to
> the raw kml or kmz by hand there alot of interesting read on the api
> site.
>
> http://code.google.com/apis/kml/documentation/kmlreference.html#icon
>

> http://code.google.com/apis/kml/documentation/kmlreference.html#icons...


>
> personally i instert all my icons polys and code using google earth
> and export the kmz file for use
>
> sample:  http://shawnsspace.com/Maps/Default.aspx
>
> If there is a certain way you are hoping to do this please be more
> specific with your post and i will be happy to assist in any way i
> can. :)
>
> On Feb 27, 10:57 am, Albert Steiner wrote:
>
>
>
> > Hi there
> > Is there an easy way to tell kml that I want to have a placemark
> > label
> > on multiple lines? Could you provide a simple code example?
> > Any support is very much appreciated!

> > Thanks, Albert- Hide quoted text -
>
> - Show quoted text -

Message has been deleted

Josh L

unread,
Mar 10, 2010, 10:07:55 PM3/10/10
to KML Developer Support - Getting Started with KML
Hi Albert,

It is not possible to use html in the <name> itself, and so the label
that shows outside the Placemark will default to one line.

However, if you just want to customize the formatting inside of the
Balloon, then you can do this using ExtendedData.

Cheers,

-Josh

Reply all
Reply to author
Forward
0 new messages