This thread seems to have been slightly side-tracked, but to take it back to the original suggestion, browser-based geolocation APIs are really quite a big deal, and are something we should definitely look to support.<br><br>
The most obvious implementation we could do would be where users visit the slippy map without having a location set in their cookie. Currently we guess at a location via IP address, but it would be good (and not difficult) to use the geolocation API here instead, falling back on the existing IP-based method if the API isn't present or if the user declines to authorise permission.<br>
<br>A more complicated interaction would be where the user has a location set in their cookie (eg of the place they were last interested in), but has since moved location, and wants to see the map of where they are now. For this, we'd probably want some kind of button (which only appears if you have the geolocation API in your browser) which would re-centre the map on their browser-provided geolocation.<br>
<br>A final scenario is where the user is in motion, and wants the map to pan so that it 'follows' their movements. This is unlikely for most desktop computers, but can be interesting when you've got a laptop open on a train (which is how I've tested it), or of course are using a mobile device (and I'm not sure of any which implement the browser geolocation API yet, but it can only be a matter of time).<br>
<br>I only currently only know of the W3C draft standard geolocation API (<a href="http://dev.w3.org/geo/api/spec-source.html">http://dev.w3.org/geo/api/spec-source.html</a>), which Firefox 3.5 implements, or available on older versions using the Georde plugin, and the Google Gears geolocation API (<a href="http://code.google.com/apis/gears/api_geolocation.html">http://code.google.com/apis/gears/api_geolocation.html</a>) which is almost identical to the standard one, apart from a few minor details.<br>
<br>I don't think OpenLayers currently supports this functionality natively (although maybe there are plans to do so?), but I've got a script working locally that interfaces with OpenLayers to provide this, and there are dozens of others (Aaron has one too: <a href="http://github.com/straup/js-iamheremap/tree/master">http://github.com/straup/js-iamheremap/tree/master</a>, working example here: <a href="http://www.aaronland.info/iamhere/">http://www.aaronland.info/iamhere/</a>).<br>
<br>If people think that adding this functionality would be useful, then I'd be happy to help implement it (I've very nearly got the Rails port working locally - just a couple more dependencies to go...)<br><br>Frankie<br>
<br>P.S The next step for browser-based map interfaces might be a compass bearing API - so that we can rotate maps to match the orientation of the user... :-)<br><br><div class="gmail_quote">On Sat, Jul 4, 2009 at 7:41 PM, John Smith <span dir="ltr"><<a href="mailto:delta_foxtrot@yahoo.com" target="_blank">delta_foxtrot@yahoo.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><br>
--- On Sat, 4/7/09, Aun Yngve Johnsen <<a href="mailto:skippern@gimnechiske.org" target="_blank">skippern@gimnechiske.org</a>> wrote:<br>
<br>
> Totally agree, I would love to see more OSM in the press,<br>
> but I have absolutely no clue in how to manage it...<br>
<br>
</div>Ask Apple or Mozilla for help?<br>
<div><div></div><div><br>
<br>
<br>
<br>
_______________________________________________<br>
talk mailing list<br>
<a href="mailto:talk@openstreetmap.org" target="_blank">talk@openstreetmap.org</a><br>
<a href="http://lists.openstreetmap.org/listinfo/talk" target="_blank">http://lists.openstreetmap.org/listinfo/talk</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Frankie Roberto<br>Experience Designer, Rattle<br>0114 2706977<br><a href="http://www.rattlecentral.com" target="_blank">http://www.rattlecentral.com</a><br><br>