Google Places Library からの応答を geoxml3 が理解してレンダリングできるものに変換する方法を知っている人はいますか?
これまでの作業:
これは私にとってはうまくいきます
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});
しかし、その場でマーカーを作成する必要があるため、geoxml3 を使用する必要があります。私の問題は、最後の行をこれに置き換えることです
var m = parser.createMarker(place);
このエラーの原因
Uncaught TypeError: Cannot read property 'icon' of undefined
おそらくhttp://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png
、その起源のためにアイコンをロードできないためです。