openlayers/openlayers — pull request #784 by pgiraud (2012-12-04 14:13:34+00:00)
Title: Enhancened Geolocation example

This pull request proposes changes to show an example of an advanced usage of the `Geolocate` control.

Once the geolocation button is clicked:
1 - the map is recentered on the current location, and then auto-recentered when the device moves. A blue marker is shown at current location,
2 - user can zoom out/in with buttons or pinch without loosing the auto-recenter feature,
3 - auto-recenter is deactivated as soon as the user pans the map. The current device location is still shown but with a grey marker. The button status changes,
4 - User can click on the geolocation again. Then map is auto-recentered.

This behavior is mostly inspired by the one from the iOS6 `plan` application which seem to be user-friendly.

`PinchZoom.js` as well as `Map.js` needed changes.

The example to test is `mobile.html`.

Please review.
Also, don't hesitate to ask for a live demo of the given example.