Skip to content

Problem with dropped points/rendering issue with GeoJSON #381

Closed
@smathermather

Description

What appears to be automatic generalization is modifying the geometry of a GeoJSON loaded from CartoDB. At some zoom levels, the data look correct. At other zoom levels, a point is noticeably missing from the geometry. (Safari 5.0.5
Firefox 8.0 up-to-date, Windows XP)

Images of the problem can be found here:
http://smathermather.wordpress.com/2011/11/28/cartodb-leaflet-and-a-little-anti-generalization/

The data can be accessed here:

http://smathermather.cartodb.com/api/v1/sql?q=SELECT%20name,%20the_geom%20FROM%20boundary%20WHERE%20name%20=%20%27Huntington%20Reservation%27&format=geojson&callback=?

My js is as below:

getBoundary();

function getBoundary1(){
    var boundaryLayer1 = new L.GeoJSON();
    boundaryLayer1.on('featureparse', function(e) {
      e.layer.setStyle({ color:  '#000000', weight: 3, fill: false, fillColor: '#009933' });
    });

    $.getJSON(
        "http://smathermather.cartodb.com/api/v1/sql?q=SELECT name, the_geom FROM boundary&format=geojson&callback=?",
        function(geojson) {
        $.each(geojson.features, function(i, feature) {
          boundaryLayer1.addGeoJSON(feature);
        })
    });

    map.addLayer(boundaryLayer1);
}

Best,
Steve

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions