1

I Use Leaflet Map Plugin. i Write this code for create and load google map tiles in LeafLet

 var map = L.map('map').setView([31.2744015, 48.7251283], 18);

    // load a tile layer

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

this code work fine. But I Want Load another google Map option in this plugin Like 3D View map enter image description here

But will this be done? thanks for help me.

Pouya
  • 1,908
  • 17
  • 56
  • 78

2 Answers2

4

Two things:

  1. Loading map tiles from Google using just a L.TileLayer contravenes the terms&conditions of Google Maps (the part about "accessing the content only through the Google Maps API"). Do not be surprised if Google gets angry at that.

    As pointed out in the answers to the question «Leaflet Map API with Google Satellite Layer» , look in the Leaflet plugins list. In particular, GoogleMutant might be of interest.

  2. As of now, Leaflet is able to display 2D maps only. There are no plans to make it display oblique imagery, or provide tilt capabilities.

    If you need these features, you might want to have a look at other web mapping libraries, such as https://www.mapbox.com/mapbox-gl-js/api/ or https://cesiumjs.org/. These can handle more degrees of camera freedom, and some degree of terrain elevation display.

IvanSanchez
  • 18,272
  • 3
  • 30
  • 45
-1

https://labs.mapbox.com/bites/00093/

pls see the source code of it , as

window.setInterval(function(){
        $('.rotating').attr('style','-webkit-transform:rotateZ('+angle+'deg);-moz-transform:rotateZ('+angle+'deg);-moz-transition:-moz-transform 0.75s;');
        if ($('.rotating').length>0) $('.pivotmarker').attr('style','-webkit-transform: rotateY('+angle+'deg);-moz-transform: rotateY('+angle+'deg);-moz-transition:-moz-transform 0.75s;');
        angle=angle*-1;
    },1500); 

may it help

Tethys Zhang
  • 427
  • 5
  • 10