watson / geopkg

:satellite: Tag npm moduels with lat/long of where on the planet the module was published :stuck_out_tongue_winking_eye:
MIT License
16 stars 2 forks source link

Ability to tweak triangulated location before accepting #1

Closed hackergrrl closed 9 years ago

hackergrrl commented 9 years ago

Though wifi triangulation is pretty good, it would be nice if geopkg open was a bi-directional operation: it'd show me a map of where it thought I was, and I could move the location pin around to match the destination more precisely.

watson commented 9 years ago

Would be a cool improvement! I'm not really sure if this is even possible - but if someone knows, leave comments below :)

hackergrrl commented 9 years ago

I was thinking about that. :)

  1. have geopkg open start an http server on localhost:XXXX
  2. launch $BROWSER to localhost:XXXX
  3. it serves up a page using the Maps API and places a movable pin rather than a static one at the triangulated position
  4. send a request back to the localhost http server every time the pin is moved
  5. server uses the resultant coords to write to stdout or package.json

Unresolved: how do you detect when the user is "done" (i.e. tab closed)? Perhaps a 'Done' button below the map? Or maybe the tab kills itself as soon as you drop the pin somewhere.

watson commented 9 years ago

Ah, nice approach. I would just make it update the location every time you move the pin. This way when you close the browser (or the server) - the last recorded location of the pin would just be used.

hackergrrl commented 9 years ago

Agreed: that's a much better approach.

hackergrrl commented 9 years ago

Phewf! The hard work is done, now it's just a matter of integrating it. :D

watson commented 9 years ago

@noffle That's super cool! This is so much the node way :smile: Break problems into smaller node-modules!

P.S. There is a "bug" in the name: noffle/place-geo-marker/issues/2