I'm working on a tool that allows users to draw geometries on a Leaflet map, which are then sent to CartoDB. However, I've noticed an odd behavior... after a polygon has been added, a varying number of seemingly random points get added to the map as well.
For example, I drew a rough polygon of Manhattan, but here's what the map displays...
What strikes me as particularly odd is that, if I remove the polygon CartoCSS, the points remain... some of them can be clicked on and the little info window that pops up correspond to the ID of the polygon, but others are unclickable.
For reference, here is the data from the_geom column for the Manhattan polygon...
{"type":"Polygon",
"coordinates":
[
[
[-74.00802612,40.75037809]
[-74.01626587,40.70250471],
[-73.9956665,40.70979201],
[-73.9805603,40.71499674],
[-73.97232056,40.74517613],
[-73.93112183,40.79821703],
[-73.9352417,40.8335541],
[-73.91052246,40.87302619],
[-73.92837524,40.87614141],
[-74.00802612,40.75037809]
]
]
}
And I checked these... not one of them corresponds to these mystery points.
Does anyone know why this is happening and what I can do about it?
{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-111.09374999999999,45.02695045318546],[-111.07177734375,40.979898069620155],[-104.0625,41.0130657870063],[-104.0625,45.02695045318546],[-111.09374999999999,45.02695045318546]]]}}
which is correct (I clean up the GeoJSON in the PHP before passing into CartoDB)