Closed seeatiger closed 2 years ago
controls: [ { name: "mapType", position: "bottomright", mapTypes: [ { title: "地图", icon: "http://api.tianditu.gov.cn/v4.0/image/map/maptype/vector.png", layer: "TMAP_NORMAL_MAP" }, { title: "卫星", icon: " http://api.tianditu.gov.cn/v4.0/image/map/maptype/satellite.png", layer: "TMAP_SATELLITE_MAP" }, { title: "卫星混合", icon: "http://api.tianditu.gov.cn/v4.0/image/map/maptype/satellitepoi.png", layer: "TMAP_HYBRID_MAP" }, { title: "地形", icon: " http://api.tianditu.gov.cn/v4.0/image/map/maptype/terrain.png", layer: "TMAP_TERRAIN_MAP" }, { title: "地形混合", icon: " http://api.tianditu.gov.cn/v4.0/image/map/maptype/terrainpoi.png", layer: "TMAP_TERRAIN_HYBRID_MAP" } ] } ]
mapType控件不支持自定义位置,官方api没有提供这个属性
controls: [ { name: "mapType", position: "bottomright", mapTypes: [ { title: "地图", icon: "http://api.tianditu.gov.cn/v4.0/image/map/maptype/vector.png", layer: "TMAP_NORMAL_MAP" }, { title: "卫星", icon: " http://api.tianditu.gov.cn/v4.0/image/map/maptype/satellite.png", layer: "TMAP_SATELLITE_MAP" }, { title: "卫星混合", icon: "http://api.tianditu.gov.cn/v4.0/image/map/maptype/satellitepoi.png", layer: "TMAP_HYBRID_MAP" }, { title: "地形", icon: " http://api.tianditu.gov.cn/v4.0/image/map/maptype/terrain.png", layer: "TMAP_TERRAIN_MAP" }, { title: "地形混合", icon: " http://api.tianditu.gov.cn/v4.0/image/map/maptype/terrainpoi.png", layer: "TMAP_TERRAIN_HYBRID_MAP" } ] } ]