Open GoogleCodeExporter opened 9 years ago
Try this example and let me know if it works for you. The example uses a
slightly modified geo.js library.
http://www.wolfpil.de/v3/sample_with_map.html
Original comment by wolfpil@gmail.com
on 14 Jan 2011 at 9:43
hey,
good idea. the problem with that is that "navigator.geolocation" should have
the highest priority since for example in lots of blackberry devices there is
gears but its really not working at all. also for android needs to have
priority, gears is a fallback. what i wanted to ask you if there is a way to
keep the initial order and extend
"else if (typeof(navigator.geolocation) != u)"
to match your case, maybe something like
"else if (typeof(navigator.geolocation) != u &&
typeof(navigator.geolocation.getCurrentPosition) != u)"
there has to be a way detect and exclude your faulty configuration.
Do you know what I mean?
Stan
Original comment by whoiss...@gmail.com
on 16 Jan 2011 at 2:28
Ah, thanksi, now I know why it's so important that navigator.geolocation has
such a high priority.
I'm not quite sure what you mean exactly.
Unfortunately it's useless to use navigator.geolocation.getCurrentPosition,
because this is also defined in Chrome (although not executed, Chrome still
needs Gears).
Whar about such a construct?
if (typeof navigator.geolocation != 'undefined') {
if (typeof google.gears != 'undefined') {
gl = google.gears.factory.create('beta.geolocation');
}
else {
gl = navigator.geolocation;
}
}
Original comment by wolfpil@gmail.com
on 16 Jan 2011 at 5:18
Original issue reported on code.google.com by
simks...@gmail.com
on 27 Oct 2010 at 2:36