AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Maptiler github8/7/2023 In addition to using the component as MapLibre GL JS or Leaflet Control it is also possible to use it stand-alone in Svelte projects with or without MapLibre GL JS or Leaflet integration.Ĭomponent API matches API described above where options and events are exposed as component properties and methods are callable on the component reference. Add layers, interactivity, fun featuresĪnd turn your setup into a web app with your favorite framework (NodeJS, etc.Import * as L from "leaflet" import Svelte component Map.addControl(new mapboxgl.NavigationControl()) Ħ. Add zoom and rotation controls to the map. Replace the url to your style and the access token placeholder by yours. The example below shows how to display a map full screen with basic controls. Create an account or sign in to yours, and create a token. To use this API developed by Mapbox, an Access Token is needed. We'll finally create our interactive map using Mapbox GL JS. Once we think we're good to go, we can change the docker run so that it runs automatically at server boot sudo docker run -t -d -restart unless-stopped -v $(pwd):/data -p 8080:8080 maptiler/tileserver-gl -c myconfig.json 5. Then, you can run and check that everything works :) sudo docker run -it -v $(pwd):/data -p 8080:8080 maptiler/tileserver-gl -c myconfig.json In your style file, replace the source and glyphs URLs by the following: "url": "mbtiles://mytiles.mbtiles" Bounds are the boundaries of the tileset, long/lat of bottom left and upper right corners. Replacing your tileset and style name accordingly.
0 Comments
Read More
Leave a Reply. |