openlayers 3 - Is it possible to setRotation in ol.View with Google maps -
i using setrotation method ol.view
similar examples available @ openlayers examples page. have encoded polyline drawn on map , fit extent of layer , if necessary rotate map.
this works great openstreetmap , custom imagery service. not work of google tile services though. there support rotation of ol.view
google map services, if so, examples? didn't see comments in api documentation ol.view
, google map services.
thanks input.
you can use rotate control 45° imagery see code this:
var map; function initialize() { var mapoptions = { center: new google.maps.latlng(45.518970, -122.672899), zoom: 18, maptypeid: google.maps.maptypeid.satellite, heading: 90, tilt: 45 }; map = new google.maps.map(document.getelementbyid('map-canvas'), mapoptions); } function rotate90() { var heading = map.getheading() || 0; map.setheading(heading + 90); } function autorotate() { // determine if we're showing aerial imagery if (map.gettilt() != 0) { window.setinterval(rotate90, 3000); } } google.maps.event.adddomlistener(window, 'load', initialize);
you can see example google45°
but normal google maps rotation not avaliable.
Comments
Post a Comment