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

Google Maps -> GeoJSON conversion #22

Open
wants to merge 24 commits into
base: master
Choose a base branch
from

Conversation

justincy
Copy link
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

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