![]() It is usually displayed at the bottom left corner of the map. The MapTiler logo attribution is a small image which links to MapTiler’s website. It includes copyright mention with appropriate hyperlink for both MapTiler and OpenStreetMap, as follows: The MapTiler text attribution must be displayed on every map. It is usually located at the bottom right corner of the map container. The MapTiler attribution is the copyright information to be included on every map using MapTiler map styles and data. Please refer to our terms or contact us for more information. The MapTiler attribution is requested on every map you create with MapTiler Cloud. This article explains why and how you should do that when using our maps. View complete source code on GitHub Learn moreĬheck out this tutorial How to display a style switcher control to learn how to create a visual style switcher control.Every map created with MapTiler Cloud must include an appropriate copyright attribution. ![]() Add the selector style to your stylesheet. MapStyle.OPENSTREETMAP reference style for OpenStreetMapĬhange the style when the user select one style.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.DATAVIZ the perfect style for data visualization, with very little noise.MapStyle.BASIC reference style for minimalist design and general purpose.MapStyle.HYBRID reference style satellite and airborne imagery with labels.MapStyle.SATELLITE reference style satellite and airborne imagery.MapStyle.WINTER reference style for winter adventure.MapStyle.OUTDOOR reference style for adventure.MapStyle.STREETS, reference style for navigation and city exploration.Copy the following code into your HTML file. In this example we will use some of the build-in styles. Create a selector to change the map style.You can start the map in a different place by modifying the starting position and starting zoom.Ĭhange the map style to a hybrid satellite images. Replace YOUR_MAPTILER_API_KEY_HERE with your actual MapTiler API key. Include the following code in your JavaScript file (Example: app.js). If you have a bundler that can handle CSS, you can import the CSS or include it with a in the head of the document via the CDN If no style is specified when instantiating the map, the SDK by default loads the streets style ( ). Then, each style offers a range of variants that contain the same level of information and has the same purpose but using different colors schemes like dark, light, etc.Ĭreate a map with the default style. The built-in styles generaly defines a purpose for which this style is the most relevant: street navigation, outdoor adventure, minimalist dashboard, etc. Code completion: reducing typos and other common mistakes.No more putting the API key in every URL. They are easier to remember, no need to type along style URL.If we make an update to a style, you won’t have to modify your codebase.Using the built-in styles and their variants defined in the SDK ( maptilersdk.MapStyle), has several advantages such as:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |