mapbox-gl-elevation:高程探测控件 mapbox-gl-export:地图导出控件(PDF/PNG) mapbox-gl-geocoder:地理编码控件官方例子 mapbox-gl-infobox:信息窗控件 mapbox-gl-legend:图例控件例子 mapbox-gl-opacity: 修改切片图层透明度例子 mapbox-gl-style-switcher:底图切换控件例子 mapboxgl-minimap: 鹰眼图控件 [例子...
mapbox-gl-export:地图导出控件(PDF/PNG) mapbox-gl-geocoder:地理编码控件官方例子 mapbox-gl-infobox:信息窗控件 mapbox-gl-legend:图例控件例子 mapbox-gl-opacity: 修改切片图层透明度例子 mapbox-gl-style-switcher:底图切换控件例子 mapboxgl-minimap: 鹰眼图控件 [例子...
•mapbox-gl-style-switcher:添加控件以在样式之间切换。 •mapboxgl-minimap:添加一个控件以显示当前地图的微型概览。 地图渲染插件 •mapbox-gl-language:自动将地图本地化为用户的语言。 •mapbox-gl-rtl-text:向 Mapbox GL JS 添加从右到左的文本支持。(案例) •mapbox-gl-traffic:使用可选的切...
mapbox-gl-controls Adds controls for a ruler, style inspector, localization, and style switcher. githubView this project codeView demo mapbox-gl-directions Adds a control to allow users to plot driving, walking, and cycling directions on the map. Directions API calls arebillable by request. ...
accessToken: mapboxgl.accessToken, unit: 'metric', // metric | imperial interactive: false, profile: 'mapbox/driving', controls: { inputs: false, instructions: false, profileSwitcher: false } }); this.map.addControl(this.directions, 'top-left'); this.directions.setOrigin(origin); // 设...
<link href="https://api.mapbox.com/mapbox-gl-js/v3.10.0/mapbox-gl.css" rel="stylesheet"> <script src="https://api.mapbox.com/mapbox-gl-js/v3.10.0/mapbox-gl.js"></script> <style> body { margin: 0; padding: 0; } #map { position: absolute; top: 0; bottom: 0; width:...
Style a marker used to mark the location of the mapbox-gl-geocoder search result. Set pitch and bearing Initialize a map with pitch and bearing camera options. Show and hide layers Create a custom layer switcher to display different datasets. Show polygon information on click When a user...
前面的文章中写了基于openlayers4的台风路径播放,最近用到mapbox GL,也要实现相似的功能,网上找了...
Adds style switcher similar to Google Maps. import{StylesControl}from'mapbox-gl-controls';// with default styles:map.addControl(newStylesControl(),'top-left');// with custom styles:map.addControl(newStylesControl({styles:[{label:'Streets',styleName:'Mapbox Streets',styleUrl:'mapbox://styles...
const map = new mapboxgl.Map({ container: 'map', style: 'mapbox://styles/mapbox/streets-v11', center: [-74.5, 40], zoom: 9 }); // 添加语言注解 map.addControl(new MapboxLanguage({ defaultLanguage: 'en', languageSwitcher: true })); // 添加地理编码器 map.addControl(new Mapbox...