Cartodb: Longitude is incorrect when adding a point

Created on 29 Nov 2016  路  16Comments  路  Source: CartoDB/cartodb

Context

Please explain here below what you were doing when the issue happened
Adding a point to the map

Steps to Reproduce

Please break down here below all the needed steps to reproduce the issue

  1. Add a point to San Francisco using the geometry point tool
  2. Check Longitude of point.
  3. Admire red warning box and extra character.

Current Result

Please describe here below the current result you got
Longitude has an extra character, preventing it from being added

Expected result

Please describe here below what should be the expected behaviour
Click 'Add' button to add point to map and point appears.

Browser and version

What internet browser (Chrome, Firefox, etc) and version was you using and version
Chrome MacOS Version 54.0.2840.98 (64-bit)

.carto file

Don't forget to rename .carto file to .zip file to be able to upload to github
I can't add the point, so ther is no .carto file

Additional info

Please add any information of interest here below

point_add_bad_lon_start

@saleiva

Frontend bug

Most helpful comment

"Hey, point out of the mercator world!" :joy:

All 16 comments

This bug is not consistent. Stopped happening an hour later.

Happened again, but then disappeared again. Here's a screenshot for a different location to show the difference. The workround is just to edit the geometry. This becomes a little more difficult when working with lines and polygons, which are affected by it, as well.

screen shot 2016-12-07 at 10 51 01 am

I think we figured this out. When you first open a map, there is a tiled map of the world. If you select one of the tiled worlds which are on the left or right of the center, it uses an out-of-range longitude. Once you zoom in and start adding dots, that longitude persists. @xavijam @saleiva

S/B: 10718793

Here's an animated gif showing what you explained in your last comment, @zingbot:

point

I'm not sure what's the best solution to fix this problem. What are your thoughts, @xavijam? Maybe we should show a more useful error message?

Yeah, I feel it could help a lot. We could improve the validator of this field checking if the value is lower than -180 or bigger than 180 in order to say something like "hey, check that your point is in another world!" or something like that...

Good, let's try that!

I think is going to be a bit tricky to find a good message that is also short, so suggestions are welcome @zingbot, @michellechandra & @xavijam.

"Hey, point out of the mercator world!" :joy:

"CARTO doesn't support multiverses yet. Please, add the point in your current planet"

I decided to write the error message like this:

Longitude is out of bounds [-180, 180].

If the longitude is not a number, we'll show the regular error:

Must be a valid longitude

I found complicated to give an explanation about what the user should do. I hope that by writing that message, users will understand that they have to move the point until it's included in that range.

deployed in ded04 for acceptance

Thanks @matallo for uploading to staging 馃

Tested this, it works like a charm for points. However it does not works for lines/polygons. There is no validation there, the geometry is added successfully, but it doesn't show up in the map.

Do you think we should handle this in this same PR?

Although the fix is probably very easy now that we have this one ready, I would open a new ticket with a small description and a link to this issue.

Ok then, creating a ticket and moving this to deploy 馃殌

Was this page helpful?
0 / 5 - 0 ratings