winny0074 / google-maps-utility-library-v3

Automatically exported from code.google.com/p/google-maps-utility-library-v3
Apache License 2.0
0 stars 0 forks source link

[GeolocationMarker] Geolocation tracking not staying centered when following user #285

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
http://trsmap.com

What steps will reproduce the problem?
1. Geolocation works and shows position
2. When following user the map doesn't keep user marker centered and will go 
off the screen on Android and Iphone
3.

Expected result:
Expected user marker to stay centered

Actual result:
User marker leaves the screen area

Version: ###

Browser / Operating System:
[e.g. FF3 / MacOSX]

Additional comments:
[Enter any additional comments about the bug here.]

*********************************************************
Tip: Star this issue (next to title) to receive notifications of status
changes against this issue, also used as a gauge for how many people are
interested in seeing it resolved.
*********************************************************

Original issue reported on code.google.com by mxrid...@gmail.com on 20 Dec 2013 at 1:32

GoogleCodeExporter commented 9 years ago
This is by design. If you wish the map to follow the user, you'll need to 
listen to the position_changed event and recenter the map.

google.maps.event.addListener(GeoMarker, 'position_changed', function() {
  map.setCenter(this.getPosition());
});

Of course this task becomes much more difficult because you may want to turn of 
this feature if the user manually pans the map to look at another location.

Original comment by chadkill...@missouristate.edu on 20 Dec 2013 at 3:37

GoogleCodeExporter commented 9 years ago
@chadKill Thanks for the responds. You nailed it. That resolved my issue, cant 
believe I forgot the add listener. 

I have implemented the drawingManager function to allow user to annotate on the 
map, does anyone know how I can use the Polyline feature to draw a polyline 
while tracking the user as to show their path?

Any help is much appreciated...

regards
mxride 

Original comment by mxrid...@gmail.com on 20 Dec 2013 at 4:35

GoogleCodeExporter commented 9 years ago
That seems like a great question to ask on StackOverflow 
(http://stackoverflow.com).

Original comment by chadkill...@missouristate.edu on 20 Dec 2013 at 5:16