# CartoDB - random points being added to map

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?

• Can you check, what your leaflet client is actually sending to the server? Try the developer tools (firebug in mozilla) in your browser via pressing F12 and check in the Network tab. Maybe it's sending malformed geometries containing points as well. – ulrich Apr 25 '16 at 22:33
• As far as I can see, everything looks good - I just did a rough outline of Wyoming and the same problem occurred. The data insert is handled by PHP, and the network tab on that page showed the following: {"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) – skwidbreth Apr 25 '16 at 22:49
• It does appear to me that at least one of the phantom points is the polygon centroid, but the others have no discernible relation to the polygon... – skwidbreth Apr 25 '16 at 22:50