wrld3d / wrld.js

A JavaScript API for beautiful 3D maps
BSD 2-Clause "Simplified" License
430 stars 52 forks source link

Set minZoom does not work. #98

Closed d3vilsn0w closed 3 years ago

d3vilsn0w commented 3 years ago

Is there any example or a way how can we set min and max zoom on map?

ghost commented 3 years ago

Hi, min/max Zoom is a Leaflet.js functionality which is not implemented in WRLD. To lock the zoom to a certain range, you'll need to listen for zoom events and block zooming beyond your limits. See this example code (for indoors, but outdoors is similar): https://jsfiddle.net/calumleask/wydavsh0/

d3vilsn0w commented 3 years ago

Great, looking at that now, and if i may ask, do you know how can tilt camera more than 45 degree.

ghost commented 3 years ago

Sorry the camera tilt is locked between vertical and 45 degrees. The rendering engine is not optimised for camera poses which result in a very long view frustum, hence keeping the viewpoint mostly overhead.

For full 3D camera control e.g. first-person view, we recommend using our Unity SDK, although this doesn't help if you're wanting to build a web app.

d3vilsn0w commented 3 years ago

Got it, thanks.

d3vilsn0w commented 3 years ago

One problem found, https://jsfiddle.net/fq8631zo/ with Image overlay. Can this be resolved?

ghost commented 3 years ago

Hi, the image overlay is not expected to be skewed to fit the geojson poly exactly as it only supports using a LatLngBounds (i.e. the image will appear between the NW and SE points provided). We'll have a look and see why the image is only updated during zoom and not during pan events.