On Nov 4, 9:34 am, Nicolas <nico...@bouil.org> wrote:
> Hi,
>
> I'm trying to read the placemark id of my KML file, after a kml event
> fired, and it doesn't work.
>
> My KML file looks like this :
>
> ...
> <Placemark id="testid">
> <id>testidagain</id>
>
> <name>Test</name>
> <styleUrl>#style1</styleUrl>
> <Point>
> <coordinates>6.121800,49.463902,0.000000</coordinates>
> </Point>
> </Placemark>
> ...
>
> and in JS, i do the following :
>
> google.maps.event.addListener(layer, 'click', function(kmlEvent) {
> var id = kmlEvent.featureData.id;
>
> alert(id);
>
> }
>
> and each time, i get a random value. The documentation said :
>
> http://code.google.com/intl/fr/apis/maps/documentation/javascript/ref...
>
> "The feature's <id>, extracted from the layer markup. If no <id> has
> been specified, a unique ID will be generated for this feature."
>
> What I have done wrong ?

I can't tell from what you have posted.  Do you have a live map that
shows the problem?

  -- Larry

>
> Thnaks for your help.

-- 
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-maps-js-api...@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to