[英]Multiple markers Google Map API v3 from array of addresses and avoid OVER_QUERY_LIMIT while geocoding on pageLoad
[英]Multiple markers Google Map API v3 from array of addresses using Angular Js
我必須使用angular js從地址數組中實現多個標記功能。
這是我的小提琴:
http://jsfiddle.net/cVsdp/175/
但是我收到以下錯誤:
Uncaught Error: [$injector:modulerr] Failed to instantiate module MyApp
誰能幫幫我嗎。
您可以將JSFiddle設置從onLoad
更改為No wrap- No wrap - in <body>
請參閱工作示例: http : //jsfiddle.net/cVsdp/179/
編輯:另外,更改行
map = new google.maps.Map(angular.element(document.querySelector("#map_canvas")[0]), myOptions);
到以下內容:
map = new google.maps.Map(document.querySelector("#map_canvas"), myOptions);
工作中的JSFiddle: http : //jsfiddle.net/cVsdp/180/
互聯網上有很多示例,但是在大多數示例中,這些數據庫中已經可以使用緯度和經度。
以下示例采用地址數組,並在Google地圖上放置多個標記。
工作示例:
jsfiddle :http://jsfiddle.net/cVsdp/182/
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.