Skip to content

Google Maps -> GeoJSON conversion - #22

Open
justincy wants to merge 24 commits into
JasonSanford:masterfrom
openplacedatabase:master
Open

justincy wants to merge 24 commits into
JasonSanford:masterfrom
openplacedatabase:master

Conversation

@justincy

Copy link
Copy Markdown
Contributor
  • mounted functions in the google.maps.geojson namespace (google.maps.geojson.from() instead of new GeoJSON())
  • created google.maps.geojson.to()
  • removed duplicate points in GeoJSON polygons for closing rings when converting to GMaps overlays; fixes Just a suggestion: for GeoJson's linear rings in polygons, remove the last vertex #17
  • setup a test suite using QUnit which tests GeoJSON -> GMaps, GMaps -> GeoJSON, and GeoJSON -> GMaps -> GeoJSON
  • fixed a bug in code that detected ring direction

See #20 for an explanation of why google.maps.geojson.to() doesn't produce GeometryCollections.

This is a pretty significant change so I understand if you have any concerns about merging it.

@doismellburning

Copy link
Copy Markdown

GMaps to GeoJSON? Yes please!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Just a suggestion: for GeoJson's linear rings in polygons, remove the last vertex

2 participants