• 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/{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 to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author bozdoz

    (@bozdoz)

    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

    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('https://{s}.google.com/vt/lyrs=m&x={x}&y={y}&z={z}',{maxZoom: 20,subdomains:['mt0','mt1','mt2','mt3']}),
    		gter = L.tileLayer('https://{s}.google.com/vt/lyrs=p&x={x}&y={y}&z={z}',{maxZoom: 20,subdomains:['mt0','mt1','mt2','mt3']}),
    		ghyb = L.tileLayer('https://{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 4 years, 11 months ago by blackdog7.
    • This reply was modified 4 years, 11 months ago by blackdog7.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Overlay tilemaps’ is closed to new replies.