![]() ![]() ![]() I wanted to create a web app whose main asset featuring an interactive map, fully self-hosted including tiles and custom geo-data, and with a customizable style. For basemaps, it is recommended to use it with traditional raster tiles (Mercator XYZ). In the following, I will explain in 5 steps how you can reproduce a starting point for something similar on your own server (the below assumes an Ubuntu server). There are three ways how to use OpenMapTiles as a map layer in Leaflet: raster tiles from server vector tiles with mapbox-gl-leaflet plugin vector tiles with VectorGrid plugin Raster tiles from server Leaflet doesn’t support vector tiles by default. Download OpenStreetMap ExtractĮxtract OSM data using. Select PBF as the output format (Optional) Additional static layersĬustom layers can be create in Shapefile format using (not tested) 2. Maptiler basic install#Ĭreate Mapbox tilesetĭownload and install Tilemaker to create your vector tiles. Lua file tells how each node should be placed it into those layers according to their tags json file listing each layer, and the zoom levels at which to apply it Tilemaker creates vector tiles (in Mapbox Vector Tile format) from an. config resources/config-openmaptiles.json \ There are default files in the source folder that can be used. Note: Shapefiles (.shp) can also be added as described on this page. You can use that functionality if you want to add custom layers into your basic tileset. If you want to include the sea in your tiles, the ability to add shapefiles is actually used by the default json and lua files, as the README of tilemaker explains: create a directory called coastline in the same place you're running tilemaker from, and then save the files from in it, such that tilemaker can find a file at coastline/water_polygons.shp. Maputnik is a free and open source visual editor for the Mapbox GL style specification. The raster tiles are rendered with MapTiler Engine. ![]() Alternatively if you want to train with the tiles served by your local vector tile server, you can download the editor or use docker to run it locally: sudo docker pull maputnik/editorĭocker run -it -rm -p 8888:8888 maputnik/editor You can use the online editor if you want to edit your style using the online maptiler tiles as example. The OpenStreetMap vector tiles are made with our open-source software released at. Start by using one of the styles listed on. Click on Code on Github, then Code > Download ZIP, and extract the style.json. In Data Source, replace the URL by the TileJSON URL you can copy from your TileServer-GL homepage. ![]()
0 Comments
Leave a Reply. |