On Dec 29, 10:55 am, john byrne <[email protected]> wrote:
> I load a map, and use GeoXML to create the overlay using this
> incantation:
>
>  geoXml = new GGeoXml("http://mapgadgets.googlepages.com/cta.kml";);

FYI - you are using GGeoXml (the Googe Maps API built in parser for
KML), not GeoXml (which is a third party parser for KML)

>  map = new GMap2(document.getElementById("map_canvas"));
>  map.addOverlay(geoXml);
>
> When a point is selected by a user, an InfoWindow is displayed.  I
> then get the LatLon of a point selected by the user using this code:
>
>  infoWindow = map.getInfoWindow();
>  latLon = infoWindow.getPoint();
>
> In this case, the Point (overlay) was created by GGeoXML using data in
> the <Placemark><Point> element.  The contents of the InfoWindow are
> also generated based on information in the particular <Placemark>.
> The Placemark element also contains a <Placemark><LookAt><Heading>
> element, and potentially a <Placemark><Camera><Heading> element.
>
> What is the best way to get the Heading value associated with the
> Point selected by the user?  

What "Heading value" associated with the point?  If that is an
attribute or an element in the KML then you can parse it out of the
KML yourself.

> I have several related questions,
> depending on the correct approach:
>
> -  Is the LookAt (or Camera) information encoded into the Point or
> InfoWindow (generated when the Point is selected)?

Probably neither.

> -  Do I re-load the KML file into a DOM object, and search for the
> individual Placemark?

That is probably the only way to do it unless one of the third party
parsers parses it out.

> - How should I disambiguate similar Placemarks?

What do you mean by that?  How are they "similar"?

  -- Larry

> -  What if GGeoXML loaded a KMZ file?
> - Are there any code examples I might follow?
>
> http://code.google.com/apis/kml/documentation/kmlreference.html#lookat
>
> tks,
>
> JB

--

You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-api?hl=en.


Reply via email to