usar script new maptypeid google georreferenciaciĆ³n como google-maps-api-3 satellite leaflet

google-maps-api-3 - script - new google maps



API de mapa de folleto con Google Satellite Layer (4)

Estoy muy interesado en la API de mapa de folletos .

Sin embargo, necesito poder usar Google Satellite Layer. No he podido encontrar un ejemplo sobre cómo agregar una capa de satélite de Google al prospecto. Entiendo que todavía necesitaré cargar la API de Google Maps para hacer esto (OpenLayers tiene un ejemplo).



Leaflet tiene una página oficial para publicar todos los complementos disponibles: http://leafletjs.com/plugins.html

Encontrará complementos allí para agregar soporte de capas de Google a Leaflet.


No necesita un complemento o la API de Google, puede agregarlo como una capa de mosaico XYZ.

Calles

googleStreets = L.tileLayer(''http://{s}.google.com/vt/lyrs=m&x={x}&y={y}&z={z}'',{ maxZoom: 20, subdomains:[''mt0'',''mt1'',''mt2'',''mt3''] });

Híbrido:

googleHybrid = L.tileLayer(''http://{s}.google.com/vt/lyrs=s,h&x={x}&y={y}&z={z}'',{ maxZoom: 20, subdomains:[''mt0'',''mt1'',''mt2'',''mt3''] });

Satélite:

googleSat = L.tileLayer(''http://{s}.google.com/vt/lyrs=s&x={x}&y={y}&z={z}'',{ maxZoom: 20, subdomains:[''mt0'',''mt1'',''mt2'',''mt3''] });

Terreno

googleTerrain = L.tileLayer(''http://{s}.google.com/vt/lyrs=p&x={x}&y={y}&z={z}'',{ maxZoom: 20, subdomains:[''mt0'',''mt1'',''mt2'',''mt3''] }); Note the difference in the "lyrs" parameter in the URL: Hybrid: s,h; Satellite: s; Streets: m; Terrain: p;