45 degrees google map

How do I get Google maps to tilt and display a 45% view?

The documentation says that he should do it automatically, but it doesn't seem to be that way. Is this a Google feature holding back the API?

Click the link and zoom in to see this feature as it is used on Google maps. Google office

<html> <head>   <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script>
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/jquery-ui.min.js"></script>
    <script src="http://maps.google.com/maps/api/js?v=3.2&sensor=false&key=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" type="text/javascript"></script> </head> <body>

<div id="Map" style="width: 100%;height: 500px"> </div>

<script>
        var latlng = new google.maps.LatLng(37.4219720,
-122.0841430);
        var myOptions = {
            zoom: 3,
            scrollwheel: false, 
            center: latlng,
            mapTypeId: google.maps.MapTypeId.HYBRID
        };
        var map = new google.maps.Map(document.getElementById("Map"), myOptions);
        var bounds = new google.maps.LatLngBounds();
        bounds.extend(CreateMarker(map,37.4219720,-122.0841430).getPosition());
        map.fitBounds(bounds);


function CreateMarker(map, latitude, longitude){
    var marker = new google.maps.Marker({       
        position: new google.maps.LatLng(latitude, longitude),        
        map: map,        
    });

    return marker; } </script> </body> </html>
+3
source share
3 answers

Here's a demo of using 45 degree satellite imagery: http://code.google.com/apis/maps/documentation/javascript/examples/aerial-rotation.html

The methods used are setTilt () and setHeading (). http://code.google.com/apis/maps/documentation/javascript/reference.html#Map

. 45- (18,19,20) .

var map;
function initialize() {
  var mapOptions = {
    center: new google.maps.LatLng(45.518970, -122.672899),
    zoom: 18,
    mapTypeId: google.maps.MapTypeId.SATELLITE
  };
  map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions);

  // changes map to use 45 degree imgary
  map.setTilt(45);
  map.setHeading(90);
}
+4

AFAIK, Google ; Google , Google Android ( ).

, , ?

, , , (), "" .

HTML 5 , , Google Maps . , Earth, .

0

, , , (op) " " (3D- 2D- ) , GMaps .

Google Maps ( / ), "" maps.google.com. (API map.setTilt(), ).

Google Earth , , Google Earth , Google Maps, " ". API Google Maps Android, , , ! Google Navigation Android ). ( , Android SDK iOS).

, , . , . , - ? , Bing ?

0

Source: https://habr.com/ru/post/1788251/


All Articles