You should now see the url of your map which you can use in the application. Scroll down until the Use vector style section. Click the close button to exit the advanced editor. When you are done, you have to publish the map so that you can use it in your application. You can change other layers as well, for example make landcover_grass and landcover_wood layers and change the color from green to white to set winter theme. Rename the layer to slopes-easy, add the filter piste_difficulty = easy to include only easy slopes in this layer and set color and opacity.Ĭreate copies of the layer - intermediate and advanced slopes, set filters to piste_difficulty = intermediate and piste_difficulty = advanced and set colors. Select the source (slopes) and source layer (we have only one - slopes) In the top left corner, choose Add Layer button. We will add 3 layers - blue, red, and black slopes. In the next step we will add slopes to the map. In the next step we will add your slopes to the map as a new source so that we can use vector tiles from this source in new layers.įrom the list of available sources, choose slopes. Now you can start editing your map style. You might want to rename the map first.Ĭlick the Advanced editing button and convert the map. On the next screen, click the Save button and save the map. We will choose Outdoor basemaps and click the Customize button. On the next screen, choose a map which you would like to use as your template. In your cloud account, under Maps click New Map button. You should first check if you have your vector tiles under Tiles section in your cloud account. In the next step, we will create custom map and we will add slopes as a new layer. Lastly, upload the mbtiles file you’ve created to your cloud account. When done, MapTiler Desktop will show you rendered data. Keep output format gzip and launch rendering. Attributes specified here will be used when working on the map style. Launch MapTiler Desktop and open the geo package.Ĭlick “Export” to initiate export wizard and select “mbtiles” format.Ĭonfigure zoom levels and attributes. MapTiler Engine includes optimization of the final filesize and used a number of colors (quantization), to minimize the disk size occupied by the rendered maps as well as the time necessary to transfer the maps to clients once the tiles are online. You can download MapTiler Desktop from MapTiler web site. The produced tiles can be saved in one of several image format. We will create vector tiles using MapTiler Desktop - the application which allows you to load your image or geodata and get a tiled map. However we have prepared the data for you. There are many ways how to download OSM data and convert them into geopackage - you can use QGIS, OpenMapTiles project, GDAL ogr2ogr etc. The OSM data is extracted and converted to geopackage. We will use ski slopes (small sample in Austria) for this example downloaded from OpenStreetMap (OSM) database. Copy the following code, paste it into your favorite text editor, and save it as a. To create your first custom map, check out the How to create a custom map tutorial. How to create your own map style and use your vector tiles along with predefined MapTiler tiles. This example demonstrates how to display a custom map from MapTiler Cloud on a web page using OpenLayers.How to generate your own vector tiles and host them in MapTiler Cloud.If this happens, don't hesitate to contact MapTiler Support for help they will deactivate your license key.This example demonstrates how to create custom map using MapTiler Cloud and OpenStreetMap (OSM) data. If you fail to shut down your Docker container correctly, your license activation will be "stuck in limbo". If you put your license in as an environment variable, it will be automatically deactivated during each shutdown of the Docker container. To start serving tiles and maps from your local dir $WORK_DIR, use: docker run -p 3650:3650 -v $WORK_DIR:$WORK_DIR maptiler/server -workDir=$WORK_DIRĬheck all supported arguments for the command line: docker run maptiler/server -help You can prepare an alias for running MapTiler Server alias maptiler-server="docker run -p 3650:3650 -e MAPTILER_SERVER_LICENSE=ABCDEF-ABCDEF-ABCEDF-ABCDEF -v $(pwd):/data/ maptiler/server" # Get your MapTiler Server license token from Data dashboard: /server/Įxport MAPTILER_SERVER_LICENSE=ABCDEF-ABCDEF-ABCEDF-ABCDEFĭocker run -p 3650:3650 -e MAPTILER_SERVER_LICENSE -v "$(pwd)":/data/ maptiler/server You can get your MapTiler Server license token from the Data dashboard. The software will be automatically deactivated at the end of execution (for example, sending a SIGTERM signal). Your license can be passed with the -e MAPTILER_SERVER_LICENSE=.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |