aaronr / bboxfinder.com

Helper page for finding bbox values from a map to help with interaction with tools like gdal, leaflet, openlayers, etc.
194 stars 79 forks source link

Enter GeoJSON and Get BBOX #4

Closed ranchodeluxe closed 10 years ago

ranchodeluxe commented 10 years ago

create a textrea. add geojson. let me see a bbox. what happens if the projection is wrong? who cares, make it look snappy

ranchodeluxe commented 10 years ago

this is a good safe test:

[{
    "type": "Feature",
    "properties": {"party": "Republican"},
    "geometry": {
        "type": "Polygon",
        "coordinates": [[
            [-104.05, 48.99],
            [-97.22,  48.98],
            [-96.58,  45.94],
            [-104.03, 45.94],
            [-104.05, 48.99]
        ]]
    }
}, {
    "type": "Feature",
    "properties": {"party": "Democrat"},
    "geometry": {
        "type": "Polygon",
        "coordinates": [[
            [-109.05, 41.00],
            [-102.06, 40.99],
            [-102.03, 36.99],
            [-109.04, 36.99],
            [-109.05, 41.00]
        ]]
    }
}]
ranchodeluxe commented 10 years ago

Overview: hmm, sorry, given former issue #5, this now seems like a lot more work than previously thought.

Action Plan: 1) we will need to convert the L.GeoJson ( or maybe just features) into something digestable by L.FeatureGroup

2) we also have to check projection types and throw errors if not WGS84 or Spherical Mercator

Conclusion: keep the styling, the lightbox and hooks -- remove the call to do anything with the geojson