Skip to content

NO LONGER SUPPORTED : Leaflet extension for multi vendors maps & projections (Google, Bing, Open projects, IGN France, SwissTopo, IDEE España, IGM Italie, ...)

Notifications You must be signed in to change notification settings

Dominique92/Leaflet.Map.MultiVendors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Leaflet.Map.MultiVendors

Leaflet plugin for multi vendors maps & projections

- OSM, Maps.Refuges.Info
- ThunderForest Outdoors, Cycles, Landscape, Transport
- IGN France, cadastre, photos
- SwissTopo
- IDEE España, photos
- IGM Italie
- OS Great Britain
- Kompass Austria
- Bing Microsoft, photos
- Google maps, photos

This plugin can switch between maps using different CRS (Ex: Ordnance Survey for Great Britain, Swisstopo, ...).

This plugin works both on Leaflet V1.+

DEMOS

See a DEMO using Leaflet V1.+

See a DEMO of France IGN layers

See a DEMO of Spain IDEE layer

See a DEMO of Italy IGM layers

Usage

Include MapMultiCRS.js & the Use L.Control.Layers as usual.

Just take care to add a crs option to each layer using a spécific crs.

<script src="https://dominique92.github.io/MyLeaflet/lib/Leaflet.Map.MultiVendors-master/src/MapMultiCRS.js"></script>
// List all required layers
var layers = {
    osm: new L.TileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'),
    osmFR: new L.TileLayer('https://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png'),
	// For non standard CRS layers, assign the required CRS as an option to the layer
	OS: new L.OSOpenSpace.TileLayer("<map OS key>", {crs: L.OSOpenSpace.CRS})
};

// Create the map with one of the layers members as initial layer
var map = new L.Map('map', {
	center: new L.LatLng (51.5, 0),
	zoom: 6,
	layers: layers.osm
});

// Add the layer control to the map.
new L.Control.Layers(layers).addTo(map);

About

NO LONGER SUPPORTED : Leaflet extension for multi vendors maps & projections (Google, Bing, Open projects, IGN France, SwissTopo, IDEE España, IGM Italie, ...)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published