Google Maps Engine API v3上的图层

时间:2014-07-21 18:58:15

标签: google-maps-api-3 layer

我想在地图上显示三个图层,但没有一个图层出现。我的initialize()函数有问题吗?我在脚本标签中做了所有正确的声明,所以我不知道问题会在哪里出现。

function initialize() {
geocoder = new google.maps.Geocoder();

var latlng = new google.maps.LatLng (37.80, -122.27);

var mapOptions = 
{    
zoom: 13,
zoomControl: true, 
mapTypeControl: false,
panControl: false,    
center: latlng,    
mapTypeId: google.maps.MapTypeId.ROADMAP  
};


var image = 'css-js/images/hospitalicon-24.png';

map = new google.maps.Map(document.getElementById('map-canvas'),      mapOptions);

//Fire Stations
var mapsEngineLayer = new google.maps.visualization.MapsEngineLayer({
  layerId: '08042600090929941501-16143158689603361093',
  map: map
});
//Hospitals
var mapsEngineLayer1 = new google.maps.visualization.MapsEngineLayer({
  layerId: '08042600090929941501-08112974690991164587',
  map: map
});

//Police Stations
var mapsEngineLayer2 = new google.maps.visualization.MapsEngineLayer({
  layerId: '08042600090929941501-11613121305523030954',
  map: map
});

}

0 个答案:

没有答案