Title: Overlay tilemaps
Last modified: November 12, 2019

---

# Overlay tilemaps

 *  [hutch07](https://wordpress.org/support/users/hutch07/)
 * (@hutch07)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/overlay-tilemaps/)
 * I have an application that uses several Amazon hosted tilelayers and a layer 
   control.
 * Is there a layer control or a tilelayer short code?
 * var TopoLayer = L.tileLayer(‘[https://mytiles.s3.blah.amazonaws.com/Tiles/Topo/](https://mytiles.s3.blah.amazonaws.com/Tiles/Topo/){
   z}/{x}/{y}.png’, { maxZoom: 16 });
 * I wouldn’t mind writing it but I do not know where to “put” the code so that 
   the WordPress plugin would use it.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Foverlay-tilemaps%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [bozdoz](https://wordpress.org/support/users/bozdoz/)
 * (@bozdoz)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/overlay-tilemaps/#post-12123687)
 * Maybe take a look at some javascript examples or the source code entirely here:
   
   [https://github.com/bozdoz/wp-plugin-leaflet-map#how-can-i-add-another-leaflet-plugin](https://github.com/bozdoz/wp-plugin-leaflet-map#how-can-i-add-another-leaflet-plugin)
 *  [blackdog7](https://wordpress.org/support/users/blackdog7/)
 * (@blackdog7)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/overlay-tilemaps/#post-12660565)
 * Yeah, I’d like the same thing: By the default osm map more overlay map options.
   
   I created it on a single website, but I can’t make another WP-site, also with
   this plugin. But how?
 *     ```
       <script>
       	var marks = L.tileLayer('https://a.tile.openstreetmap.hu/tt/{z}/{x}/{y}.png', {minZoom:5,maxZoom: 17});
       	var osm = L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {minZoom:5,maxZoom: 17}),
       		mapy = L.tileLayer('https://m4.mapserver.mapy.cz/turist-m/{z}-{x}-{y}.png', {minZoom:5,maxZoom: 18}),
       		gsat = L.tileLayer('https://{s}.google.com/vt/lyrs=s,h&x={x}&y={y}&z={z}', {minZoom:5,maxZoom: 18,subdomains: ['mt0', 'mt1', 'mt2', 'mt3']}),
       		gstre = L.tileLayer('http://{s}.google.com/vt/lyrs=m&x={x}&y={y}&z={z}',{maxZoom: 20,subdomains:['mt0','mt1','mt2','mt3']}),
       		gter = L.tileLayer('http://{s}.google.com/vt/lyrs=p&x={x}&y={y}&z={z}',{maxZoom: 20,subdomains:['mt0','mt1','mt2','mt3']}),
       		ghyb = L.tileLayer('http://{s}.google.com/vt/lyrs=s,h&x={x}&y={y}&z={z}',{maxZoom: 20,subdomains:['mt0','mt1','mt2','mt3']});
       	var map = L.map('map', {
       		center: [47.5432, 19.001],
       		zoom: 12,
       		layers: [osm, marks]
       	});
       	var baseLayers = {
       		"OpenStreetMap": osm,
       		"Mapy.cz": mapy,
       		"guglistre": gstre
       	};
       	var overlays = {
       		"sziklafalak nevei": rocks,
       		"guglisat": gsat,
       		"jelzett turistautak": marks
       	};
   
       	L.control.layers(baseLayers, overlays).addTo(map);
       	L.control.scale({updateWhenIdle: true, maxWidth: 200, metric: true, imperial: false, position: 'bottomleft'}).addTo(map);
       </script>
       ```
   
    -  This reply was modified 6 years, 1 month ago by [blackdog7](https://wordpress.org/support/users/blackdog7/).
    -  This reply was modified 6 years, 1 month ago by [blackdog7](https://wordpress.org/support/users/blackdog7/).

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Overlay tilemaps’ is closed to new replies.

 * ![](https://ps.w.org/leaflet-map/assets/icon-256x256.png?rev=1693083)
 * [Leaflet Map](https://wordpress.org/plugins/leaflet-map/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/leaflet-map/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/leaflet-map/)
 * [Active Topics](https://wordpress.org/support/plugin/leaflet-map/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/leaflet-map/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/leaflet-map/reviews/)

 * 2 replies
 * 1 participant
 * Last reply from: [blackdog7](https://wordpress.org/support/users/blackdog7/)
 * Last activity: [6 years, 1 month ago](https://wordpress.org/support/topic/overlay-tilemaps/#post-12660565)
 * Status: not resolved