Kml - Polygon boundary, id and description

43 views
Skip to first unread message

MRA

unread,
Jul 20, 2011, 9:48:39 AM7/20/11
to Google Maps JavaScript API v3
hello, i want to know if there is any limitation on the amount of
boundarys that can be added to a polygon in a kml for the api and if
is that there are any known issues about the repeted id's in a kml.
all this because I have a kml with a polygon with two innerboundarys
and only one appears besides changing some of the descriptions and id
of them when see it in the api but works perfect googleearth(i have to
add that there are some repeated id's, and of course i do it on
purpose).
my kml is: https://sites.google.com/site/mandino63/mandino.kml

geoco...@gmail.com

unread,
Jul 20, 2011, 9:51:25 AM7/20/11
to Google Maps JavaScript API v3
On Jul 20, 9:48 am, MRA <marioandin...@gmail.com> wrote:
> hello, i want to know if there is any limitation on the amount of
> boundarys that can be added to a polygon in a kml for the api

Yes. See:
http://code.google.com/apis/kml/documentation/mapsSupport.html

-- Larry

Rossko

unread,
Jul 20, 2011, 10:52:20 AM7/20/11
to Google Maps JavaScript API v3
> add that there are some repeated id's, and of course i do it on
> purpose).

Why? Duplicate id attributes are invalid in any kind of XML, you
can't complain if your invalid file doesn't render the way you expect
it to.

MRA

unread,
Jul 20, 2011, 11:08:37 AM7/20/11
to google-map...@googlegroups.com
it actually does render fine and the duplicated id's has no problem in google earth, so i just want to know if it also works in the api; and i think it has more problems whith the descriptions than the duplicated id's

MRA

unread,
Jul 20, 2011, 11:31:20 AM7/20/11
to Google Maps JavaScript API v3
you could download it and open on google earth you will see that there
are three polygons that has a description "2" but in my kml viewer
with the api it three have a description "3" and some of the polygons
with the description "3" have description "1" and the polygon with
description and id "calle" has one more innerboundary in google earth

Rossko

unread,
Jul 20, 2011, 3:31:24 PM7/20/11
to Google Maps JavaScript API v3
Duplicate id attributes are invalid in any kind of XML, you
can't complain if your invalid file doesn't render the way you expect
it to.
The fact that some renderers are less picky than others doesn't make
it any less invalid.

id attributes beginning with numbers are invalid too, by the way.

All thet depends on if you really mean id, or mean name or description
perhaps. Can't tell because ...

> you could download it

I can't, https://sites.google.com/site/mandino63/mandino.kml gives me
page not found.

MRA

unread,
Jul 21, 2011, 10:55:21 AM7/21/11
to google-map...@googlegroups.com
I found out that if there are duplicated id's it asigns to each object with the same id all the other tags same as the first object with that id, i was just making a test of that because it is not defined in the api itself.
And i was working with the file locally so i totally fogot and deleted it from the site but it is there right now(i have already figured out how the duplicated id's are handle by the api and it has no one id anymore, again it was just for testing) and i found out that i have just one tag innerboundary for three linearings and it never fail or show up in google earth but in the api it render just the first linearring
Sorry about that and thanks a lot
Ah, is there a way to validate my kml for the api? Or an interactive editor for kml to see this kind of error?
--
You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group.
To post to this group, send email to google-map...@googlegroups.com.
To unsubscribe from this group, send email to google-maps-js-a...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Rossko

unread,
Jul 21, 2011, 3:29:55 PM7/21/11
to Google Maps JavaScript API v3
> but it is there right now

Not for me

> Ah, is there a way to validate my kml for the api?

More than one
http://www.google.com/search?q=kml+validator
although these only validate the KML. They will not tell you if there
are any KML features included that aren't implemented in Maps (not
every kind of KML tag is)
http://code.google.com/apis/kml/documentation/mapsSupport.html
Reply all
Reply to author
Forward
0 new messages