jenraulerson / geo-location-javascript

Automatically exported from code.google.com/p/geo-location-javascript
1 stars 1 forks source link

Sample web pages was loading and no response #30

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.I use the browser on the android phone

2.connect to these two  sample web pages
http://www.merkwelt.com/people/stan/geo_js/sample_with_map.html
http://www.merkwelt.com/people/stan/geo_js/sample.html
3.when I connect to the page,the GPS using icon on the phone will show for 2 or 
3sec.When I connect the sample web pages,the map on the page is not loading,and 
the browser loading bar stop ,and no map response. 
What is the expected output? What do you see instead?
The expected output is see the map and my position.
I see the loading and no response page. 

What version of the product are you using? On what operating system?
HTC Magic.Android ver 1.5.

Please provide any additional information below.

Original issue reported on code.google.com by simks...@gmail.com on 27 Oct 2010 at 2:36

GoogleCodeExporter commented 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

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
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