


The plugin offers maps of the entire world in vector or raster tiles, but can also open maps from any other URL.
#MAPTILER GITHUB CODE#
Plugin is an open-source project with code available at GitHub repository and open to any contribution from developers and users. The plugin allows anybody to easily load map data of the entire planet (from OpenStreetMap project), with details down to the street level from Cloud or any other URL.

The easiest way to load them is via MapTiler plugin. In this NodeJS example, you can see that the package Node Fetch has been npm installed and is passed to the config object of the MapTiler Client.QGIS added support for the native loading of vector tiles from QGIS 3.14. If the fetch() function exists (browser or Node >= 18) then it is going to be resolved automatically, Yet, a custom fetch() function can be provided to the config object for Node < 18. NodeJS includes a stable fetch() function only from its version 18, and this client does not contain a polyfill. Read more about bounded static maps on our official API documentation. 📣 Note: The GeoJSON for this track contains 9380 couples of coordinates, which is a lot! In order to send the track to MapTiler Cloud static maps API, the client simplifies the long paths while keeping a high degree of precision using a very fast Ramer-Douglas-Peucker algorithm. bounded ( // The bounding box on Europe, // Options ) Note that if a path or markers are provided, the framing of the map will not automatically adapt to include those (use the automatic mode for that).Ĭonst imageLink = maptilerClient. This type of map is centered on a longitude-latitude coordinate and the zoom level must also be provided (from 0: very zoomed out, to 22: very zoomed in). MapStyle.OCEAN (reference style, this one does not have any variants).MapStyle.OPENSTREETMAP (reference style, this one does not have any variants).MapStyle.TONER reference style for very high contrast stylish maps.MapStyle.VOYAGER reference style for stylish yet minimalist maps.MapStyle.TOPO reference style for topographic study.MapStyle.BRIGHT reference style for high contrast navigation.MapStyle.BASIC reference style for minimalist design and general purpose.MapStyle.HYBRID reference style satellite and airborne imagery with labels (no variants).MapStyle.SATELLITE reference style satellite and airborne imagery (no variants).MapStyle.WINTER reference style for winter adventure.MapStyle.BACKDROP, the perfect style for data visualization, with very little noise.MapStyle.DATAVIZ, the perfect style for data visualization, with very little noise.MapStyle.OUTDOOR reference style for adventure.MapStyle.STREETS, reference style for navigation and city exploration.In the following static map functions, the option object features a style property that can be a string or one of the built-in style shorthand. 📣 important: only image URLs are returned.Ĭontrary to the other functions of this library, the static map functions do not perform any query to MapTiler Cloud API, instead they build the image URL for you to use in elements. Three modes are available: centered, bounded and automatic. Add path or polygon, with a parametric line width and color and a parametric filling color.Add markers with a custom icon (or default icon with custom color).Choose from one of the MapTiler style or your own.Maptiler Cloud provides many possibilities for creating static maps as PNG, JPEG or WebP images. ✅ Please, use static maps URLs only from client side elements, and do not 🚫 store or redistribute the static map files. Read more about fetching your own data on our official documentation. Since the result is a GeoJSON, it can easily be added to a map with. in an async function, or as a 'thenable': const result = await maptilerClient. Backward compatibility: guaranteed on changes to API endpoints.Type safety - for higher quality code and testing.Content assist and code hinting providing contextual help.Code completion: reducing typos and other common mistakes.Better developer experience of working with APIs in the code editor - with parameter info, quick info, and member lists.The project is entirely written in TypeScript and all the function arguments are nicely documented and typed. Coordidinate systems search and tranform.The MapTiler Client JS exposes a number of handy functions that wrap API call to MapTiler Cloud API services, such as: Services such as geocoding, geolocation and more!ĪPI Client Library for JavaScript / TypeScript What? The Javascript & TypeScript API client library to enjoy MapTiler Cloud's
