Skip to content
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

params/options not populating #187

Closed
ljwolf opened this issue Aug 24, 2017 · 4 comments · Fixed by #243
Closed

params/options not populating #187

ljwolf opened this issue Aug 24, 2017 · 4 comments · Fixed by #243
Labels
Milestone

Comments

@ljwolf
Copy link
Contributor

ljwolf commented Aug 24, 2017

around l639 in context.py, we update the params & options if the user passes a zoom in, but we only update the options dict if the user does not pass in a zoom level.

This means that, if lat,lng,zoom are all None, the resulting query URL does not have a bounding box.

@andy-esch and I get very different defaults in this case, so this may be an issue with something beyond cartoframes?

@andy-esch
Copy link
Contributor

@ljwolf, looks like the origins of this come from CartoDB/Windshaft-cartodb#734 (comment). We can wait for a fix on this, but I realized that there's another, better, way to set the view via URL params:

https://<static map call>.png?lat=<lat>&lon=<lon>&zoom=<zoom>

We just need to get the lon/lat/zoom from the bounding box.

@andy-esch
Copy link
Contributor

Digging into Windshaft a little, it looks like there's a URL param for bbox, but I haven't been able to get it to work:

https://ljw.carto.com/api/v1/map/static/named/cartoframes_ver20170406_layers1_time0_baseid1_labels0_zoom0/800/400.png?config=%7B%22sql_0%22%3A+%22SELECT+%2A+FROM+nat%22%7D&bbox=-85.605118,30.355757,-80.751434,35.000828

@rochoa does bbox work like this or am I missing something?

@rochoa
Copy link
Contributor

rochoa commented Aug 28, 2017

That should work. However, we have a regression and it's broken since CartoDB/Windshaft-cartodb@29a6658. See CartoDB/Windshaft-cartodb#735.

BTW, the zoom+lon+lat combo works, in case you need it.

@andy-esch
Copy link
Contributor

Cool, thanks @rochoa. Now I need to dig up how to turn a bounding box into a lng/lat/zoom.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants