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

Drawing/Viewing of GeoJSON layers #78

Closed
rsbudd opened this issue Sep 16, 2019 · 4 comments
Closed

Drawing/Viewing of GeoJSON layers #78

rsbudd opened this issue Sep 16, 2019 · 4 comments
Assignees
Milestone

Comments

@rsbudd
Copy link

rsbudd commented Sep 16, 2019

Hello Mr. Kemp:

Is it possible to to draw (interactively), save to GeoJSON format the resulting polygon, and also to recall/reload/draw the GeoJSON upon the map with your jk64-plugin-reportmap? I think I can utilize what is described for the Google API here with regards to layers; https://developers.google.com/maps/documentation/javascript/examples/layer-data-dragndrop so that it performs similar to what we can visualize here: http://geojson.io

The problem I'm trying to solve is to present a map to the end user, allow them to draw a geofence outline on the map (polygon, circles, square, etc.) and then save that in a standard GeoJSON format for later recall and post processing of vehicle gps breadcrumbs as they enter or exit the boundaries defined by the GeoJSON.

Thank you -- big fan of your work and your continued writing, I learn quite a bit from the discussions.

Budd

@jeffreykemp
Copy link
Owner

Great idea. Not sure when I'll have time to dig into it myself but I'll keep this on the radar. In the meantime if you want to give it a shot I encourage you to do so.

@rsbudd

This comment has been minimized.

@jeffreykemp
Copy link
Owner

jeffreykemp commented Nov 15, 2019

Features added:

  • Add option to allow user to drag-and-drop GeoJSON fragments and files onto the map. The features are rendered on the map in the data layer.
  • Event loadedGeoJson (for dynamic action).
  • Add option to allow one or more shapes (marker, polygon, polyline, rectangle, and/or circle) to be added to the map by the user.
  • Allow user to select a feature to move, edit, or delete it. Allow user to add extra polygons as "holes" in another polygon.
  • Events: addFeature, removeFeature, setGeometry.
  • Javascript API call to load GeoJSON string (e.g. from application code, or loaded from database).

Known Issues:

  • The "circle" feature is not very useful. After drawing a circle, the feature is merely rendered as a single marker at the centrepoint, with a hidden "radius" attribute. No ability to view or edit the circle radius is given.

@jeffreykemp
Copy link
Owner

Added in Release 1.1

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

No branches or pull requests

2 participants