In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you what the mapbox gl in GIS has to load. I hope you will get something after reading this article. Let's discuss it together.
In addition to loading the client-controlled style of the base map, mapbox gl can also load the regular image base map. Here refers to the published images or vector map slices, often used online, such as Tiandi Map, Google Maps, Gaode Baidu, etc., the loading of the base image, mapbox gl, mainly to modify the corresponding style style.
/ / this is the base image slice that loads the arcgis server release.
Var map = new mapboxgl.Map ({
Container: 'map'
Style: {
/ / the current version of the map uses 8.
"version": 8
/ / data source, you can set up multiple data sources
"sources": {
"mapsource": {
/ / data source type is raster
"type": "raster"
/ / address of slices: arcgis server can be accessed only if the slices have been published. For more information, please see arcgis server's wmts release.
"tiles": ['http://map.geoq.cn/arcgis/rest/services/ChinaOnlineCommunity/MapServer/WMTS/tile/1.0.0/ChinaOnlineCommunity/default/default028mm/{z}/{y}/{x}.png']'
/ / the size of the slice, which is usually 256
"tileSize": 256
}
}
/ / load the layers in the data source
"layers": [{
"id": "mapsource"
"type": "raster"
/ / Select id in source for data source
"source": "mapsource"
/ / sets the scalable level of the layer
"minzoom": 0
"maxzoom": 18
}]
}
});
/ / load the vectors and annotation layers of the heaven and earth map
Style: {
"version": 8
"sources": {
"mapsource": {
"type": "raster"
/ / Image slicing of day map. Now sky map needs to apply for token.
"tiles":
['http://t1.tianditu.com/vec_w/wmts?service=wmts&request=GetTile&version=1.0.0&LAYER=vec&tileMatrixSet=w&TileMatrix={z}&TileRow={y}&TileCol={x}&style=default&format=tiles&tk='],
"tileSize": 256
}
/ / the data source of the annotation. Multiple data sources can be added to source.
Annotationsource ": {
"type": "raster"
"tiles": ['http://t0.tianditu.com/cva_w/wmts?service=wmts&request=GetTile&version=1.0.0&LAYER=cva&tileMatrixSet=w&TileMatrix={z}&TileRow={y}&TileCol={x}&style=default&format=tiles&tk='],'
"tileSize": 256
}
}
/ / load layers of multiple sky maps respectively
"layers": [{
"id": "mapsource"
"type": "raster"
"source": "mapsource"
"minzoom": 0
"maxzoom": 18
}, {
"id": "annotationsource"
"type": "raster"
"source": "annotationsource"
"minzoom": 0
"maxzoom": 18
}]
}
Similar to the maps of Gao de and Baidu, the slicing addresses of these maps found on the Internet can also be accessed. It should be noted that the slicing layer must be made into a web mecator coordinate system before it can be accessed.
After reading this article, I believe you have a certain understanding of "what is the loading of mapbox gl in GIS". If you want to know more about it, you are welcome to follow the industry information channel. Thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.