0
我想在谷歌地圖上放置針點。但問題是我有這麼多的位置針點,我做這件事的方式有點困難。有一個簡單的方法去做這個?在谷歌地圖上放置針點
的方法,我做
.controller('MapCtrl', function($scope, $ionicLoading, $compile, $state) {
function initialize() {
//variables for adding the coordinates of the locations
var Chunnakam = new google.maps.LatLng(9.741527 ,80.033931);
var Nelliady = new google.maps.LatLng( 9.828288,80.220362);
var Karaditoku_Kilinochchi = new google.maps.LatLng(9.380289,80.377);
//alot more of these come after this
,我將分這樣
var marker = new google.maps.Marker({
position: Chunnakam,
map: map,
title: 'Chunnakam'
});
var marker2 = new google.maps.Marker({
position: Nelliady,
map: map,
title: 'Nelliady'
});
//
var marker3 = new google.maps.Marker({
position: Karaditoku_Kilinochchi,
map: map,
title: 'Karaditoku Kilinochchi'
});
有沒有一種簡單的方法來做到這一點?謝謝。