2

I am using LeafletJs as mapping library for OpenStreetMaps. Is there any method map.Tilt() in Leaflet api like google provides

map = new google.maps.Map(document.getElementById('map-canvas'), {
    zoom: 18,
    center: new google.maps.LatLng(35.8313284, -82.7251666),
    mapTypeId: google.maps.MapTypeId.SATELLITE,
    heading: 90,
    tilt: 30
});

I need not SATELLITE view. Recently i am viewing markers like this. I need to show in 20/30 degree angled the map. enter image description here

  • crosspost: stackoverflow.com/questions/27367898/… – scai Dec 9 '14 at 11:39
  • yep, I am finding my answer and nobody cares. – Moshii Dec 9 '14 at 11:43
  • Nobody cares. Is this your take on not getting an answer to a non-trivial question within 30 minutes? Please, don't cross post, it just dilutes the value of both sites. – John Powell Dec 9 '14 at 11:56
2

There is no builtin functionality for this in Leaflet, and no plugin to do it that I am aware of either.

You could maybe produce something like it with some CSS transform3d hack, but it would likely look pretty horrible.

In general, I think OpenLayers 3 might be more suited for pseudo-3d functionality. I have not used OpenLayers 3 myself, though.

2

This can be accomplished using a css Transform, but it doesn't look great, but it works well enough for some things. The screenshot below uses the style: transform: translate3d(-300px, -141px, 0px) on the div containing the map.

Using transform 3d

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.