Skip to content
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

Problem with dropped points/rendering issue with GeoJSON #381

Closed
smathermather opened this issue Nov 29, 2011 · 3 comments
Closed

Problem with dropped points/rendering issue with GeoJSON #381

smathermather opened this issue Nov 29, 2011 · 3 comments
Assignees
Labels
Milestone

Comments

@smathermather
Copy link

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

@mourner
Copy link
Member

mourner commented Dec 5, 2011

You're right, that's some weird generalization bug, I'm looking into it. Thanks for reporting!

@ghost ghost assigned mourner Dec 5, 2011
@mourner mourner closed this as completed in dd3788f Dec 5, 2011
@mourner
Copy link
Member

mourner commented Dec 5, 2011

Should be fine now.

@smathermather
Copy link
Author

Fixed. Perfect and thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants