-
Notifications
You must be signed in to change notification settings - Fork 58
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
Named map auto-view does not seem to work with usernames with hyphens #734
Comments
@andy-esch, nice one you caught here! 💯 First of all, the Second, and most important: "it will estimate the extent based on the involved table", the key is the estimate. There are several reasons why the estimation might fail: no tables associated with the query, not stats for the tables, wrong stats on the tables. But none of those is the scenario in your case. Let me explain. The process is as follows: we compute the tables associated with the layer query, with those tables we calculate the maximum extent using the ST_EstimatedExtent of each table. The problem is, as you pointed, with usernames with hyphens, well not that simple, but with usernames with hyphens for users that belong to multi user accounts (aka organizations). Normal users have their tables in the When we compute the tables associated with the query of the layer, we return the schema name as well to avoid issues with table names collisions and to use the I've written all this down so we can investigate further where we should make the proper changes/fixes, as I'm not sure if we should fix it at our application/queries, or ST_EstimatedExtent should handle quoted schema (table) names. |
Hey @rochoa First of all, thanks for the detailed explanation, super useful!!. The second, now that Core Team take care of this kind of issues, do you think it'd be better to open this issue in |
I have a hunch that the hyphens are the problem here, but I don't know how to look into it very easily so thought I'd open a ticket about my bug hunch. I've seen that on all carto accounts with a hyphen in the username, the cartoframes static map output is zoomed out to the same level, but the un-hyphenated ones behave as expected from the docs:
What seems weird to me, though, is that the default bounding box view is not being used as far as I can tell.
Compare this:
https://lwolf-carto.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
to this:
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
It uses the same dataset and same named map template:
cc @rochoa
The text was updated successfully, but these errors were encountered: