-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Might be nice to guess a good Z also. #64
Comments
So the center is basically the center coords of the model. That seems reasonable for Leaflet's Map constructor .. centers the model in the middle of Leaflet. What could we do for Z? Possibly figure out the Z that would make sure all the model is in Leaflet's view? I imagine there is a power of 2 stunt for that. For both LeafletDraw and leafleIInit we could calculate these in the options object. We might want to add pixel versions too? I.e. the programmer could know the pixel width/height of Leaflet's div and prefer to not bother with lon/lats |
Maybe tilebelt has a hint? |
tilebelt has a function that gives a zoom given a bbox. It is not documented or mentioned, but is used by bboxToTile which "Get the smallest tile to cover a bbox" I have no idea how it works!
|
That is wild. Is bbox in the form [west, south, east, north] ? |
Yup, but I'm not so sure it works. It gave a pretty odd result for the santa fe bbox: bbox = [-109.050044, 31.332301, -103.001964, 37.000104] |
The center is guessed from the bbox. It might be nice to guess the Z value also.
agentscript/gis/leafletInit.js
Line 68 in 8e999fe
The text was updated successfully, but these errors were encountered: