当前位置: 代码迷 >> Web前端 >> googlemap在自定义map上比百度map接口丰富很多
  详细解决方案

googlemap在自定义map上比百度map接口丰富很多

热度:486   发布时间:2013-12-23 14:30:52.0
google地图在自定义地图上比百度地图接口丰富很多
在自定义地图参数上,比百度地图的参数丰富很多。唯一的遗憾是稳定性太差。也是中国特色。

百度自定义地图8月份才出来,和google比起来确实还很年轻。

var  mapStyle ={ 
        features: ["road", "building","water","land"],//隐藏地图上的poi
        style : "dark"  //设置地图风格为高端黑
    }
map.setMapStyle(mapStyle);


POI去掉以后,连ROAD该有的路名都丢了。我也不知道该说什么。


下面是GOOGLE地图的参数。POI关闭以后,ROAD的名字还是在的。百度的API算是一个BUG


引用

Constant Description
administrative Apply the rule to administrative areas.
administrative.country Apply the rule to countries.
administrative.land_parcel Apply the rule to land parcels.
administrative.locality Apply the rule to localities.
administrative.neighborhood Apply the rule to neighborhoods.
administrative.province Apply the rule to provinces.
all Apply the rule to all selector types.
landscape Apply the rule to landscapes.
landscape.man_made Apply the rule to man made structures.
landscape.natural Apply the rule to natural features.
landscape.natural.landcover Apply the rule to landcover.
landscape.natural.terrain Apply the rule to terrain.
poi Apply the rule to points of interest.
poi.attraction Apply the rule to attractions for tourists.
poi.business Apply the rule to businesses.
poi.government Apply the rule to government buildings.
poi.medical Apply the rule to emergency services (hospitals, pharmacies, police, doctors, etc).
poi.park Apply the rule to parks.
poi.place_of_worship Apply the rule to places of worship, such as church, temple, or mosque.
poi.school Apply the rule to schools.
poi.sports_complex Apply the rule to sports complexes.
road Apply the rule to all roads.
road.arterial Apply the rule to arterial roads.
road.highway Apply the rule to highways.
road.highway.controlled_access Apply the rule to controlled-access highways.
road.local Apply the rule to local roads.
transit Apply the rule to all transit stations and lines.
transit.line Apply the rule to transit lines.
transit.station Apply the rule to all transit stations.
transit.station.airport Apply the rule to airports.
transit.station.bus Apply the rule to bus stops.
transit.station.rail Apply the rule to rail stations.
water Apply the rule to bodies of water.