On Feb 6, 6:07 pm, Tyler Waring <geogodesi...@gmail.com> wrote:
> That's kind of where I dead ended.
>
> google.maps.event.addListener(kmlLayer, 'click', function(kmlEvent) {
>   var name = kmlEvent.featureData.name;
>   var text = kmlEvent.featureData.description;
>   var pos = kmlEvent.latLng;
>   var offset = kmlEvent.pixelOffset;
>   alert(name);
>   showInFormatedInfoWindow(name, text, pos, offset);
>   });
>
> function showInFormatedInfoWindow(name, text, position, offset) {
>   iw.setOptions({
>   content: "<div class='infowindow'><b>" + name + "<\/b><p>" + text +
> "<\/p><\/div>",
>   position: position,
>   pixelOffset: offset });
>   iw.open(map);
>  }
>
> I ended up getting undefined values for kmlEvent.featureData.name and
> kmlEvent.featureData.description.
>
> Not sure if there is a problem with my kml file or not. I converted it from
> a standard ESRI shapefile using QGIS.


If you provide a link to your map and kml file (as requested in the
posting guidelines) it would be easier to help.

  -- Larry

-- 
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-v3@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