如何在gmap 3中使用卫星地图

问题描述 投票:0回答:2

我在我的网站上使用gmap 3,但我想要卫星地图

这是我的gmap 3激活..

 $('.map') 
  .gmap3({
    center:[37.7638886, -122.4563572],
    zoom:14,
    scrollwheel: false,
    mapTypeControl: false,
    streetViewControl: false,
    mapTypeId: "shadeOfGrey", // to select it directly
    mapTypeControlOptions: {
        mapTypeIds: [google.maps.MapTypeId.ROADMAP, "shadeOfGrey"]
      }
  })
google-maps-api-3 ggmap jquery-gmap3
2个回答
0
投票

您应该使用satellite的值作为mapTypeId对象中的MapOptions字段:

$('.map') 
  .gmap3({
    center:[37.7638886, -122.4563572],
    zoom:14,
    scrollwheel: false,
    mapTypeControl: false,
    streetViewControl: false,
    mapTypeId: "satellite"
  })

Documentation


-1
投票

它为我工作

    // satellite map active
     $('.map_se') 
      .gmap3({
        center:[40.748817, -73.985428],
        zoom:3,
        scrollwheel: false,
        mapTypeControl: true,
        streetViewControl: false,
        mapTypeId: google.maps.MapTypeId.SATELLITE
      })
      .marker([
        {address:"46000, Canada", icon: "assets/img/map-icon.png"}
    ])
© www.soinside.com 2019 - 2024. All rights reserved.