Someone knows how to translate a response from the Google Places Library into something geoxml3 can understand and render?
Work so far:
This works well for me
var a = {
location: new google.maps.LatLng(12, 13),
radius: 1000
};
var places = new google.maps.places.PlacesService(map);
places.search(a,searchCallback);
...
(in searchCallback function)
var m = new google.maps.Marker({map: map, position: place.LatLng});
but I also need to create markers on the fly so I need to use geoxml3. My problem is that replacing the last line with this
var m = parser.createMarker(place);
causes this error
Uncaught TypeError: Cannot read property 'icon' of undefined
Maybe because it cannot load the icon http://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png because of its origin.
geoxml3 is a google maps API v3 kml parser. If you translate the response from the places API into kml, you could make that work, but I don’t know why you would do that. Perhaps you could explain why you want to use geoxml3, you don’t need it for the stated goal “to create markers on the fly”, as you can do that easily with the google maps API v3 without it.