Geolocation/Maps API Directions not displaying on map - google-maps

In Safari I have an issue with the Google Maps API directions service. I use HTML5 Geolocation to display directions to a location on page load.
Here is a page that uses this.
http://northwestmarkets.com/all-stores/arlington-food-pavilion
What about Safari could cause this error. I works in IE, Chrome and Firefox

Open System Preferences / Security and select the General tab.
Click the gold padlock icon bottom left in the pane to make any necessary changes. You will be prompted for your admin password.
If necessary, make sure: Disable Location Services is not selected. Click: Reset Warnings.
support: http://support.apple.com/kb/HT4239
also checkout this W3C geolocation API not working on Safari 5, looks like in safari 5 geolocation only works with wifi

Related

How do you fake your location with the google maps api

I am using the google maps API to gain a users location:
https://developers.google.com/maps/documentation/geolocation/intro
To test this I would like to fake the location however setting chromes geo location does not work as it seems to ignore this.
In the maps api itself you can't fake the position because it uses the geolocation functionality of your browser. If you want to fake your geolocation in Chrome you can do it like this:
Press F12 to open the Developer Console. Change to the tab Console and open the menu with the 3 dots icon. Select More Tools --> Sensors and change the default value for the Geolocation from "No override" to a preset or enter own coordinates. Now reload the page and see how it works.
I tested it right now on this Google Geolocation Tutorial page and inside an own application with Google maps. Good luck!
It works the same way in:
Vivaldi
Opera (use CTRL + SHIFT + C instead of F12)
Different for:
Firefox (I think you have to use an extension)
Internet Explorer 11 (F12, Tab Emulation, Geolocation --> on and enter lat and lon

Google maps API doesn't work in safari

hello im hosting Google maps API on my localhost for now, and it appears fine in Chrome and the mobile phone version. (both safari and chrome iPhone versions).
My problem is Google maps doesn't show when it comes to my Mac version of Safari. the Grey(background) shows and the cursors change to the Google maps cursor, but the map and content doesn't display. what can be the problem?
Here is a link to the map. as you can see the map displays in Chrome but not in safari.(at least not for me).
http://jsbin.com/cahicomame/1/edit?html,output
there is no guarantee that navigator.geolocation.getCurrentPosition will return a result. The user may deny the permission or the geolocation-service may not be able to locate the user.
You better initialize the map with a default-center (center is required to display the map).
I find the solution after 1 hours , it's because my website (developpement) was in http and not https :) Safari will ask your localisation.

Getting chrome to go full screen, programmatically

When I view the impress.js website in chrome on iOS, the tab bar slides up and disappears. How do I do that?
Note: doesn't happen in safari on iOS.
A simple Google search would suffice for this question.
http://updates.html5rocks.com/2011/10/Let-Your-Content-Do-the-Talking-Fullscreen-API
https://developer.mozilla.org/en-US/docs/Web/Guide/DOM/Using_full_screen_mode
http://davidwalsh.name/fullscreen
All are excellent resources (and the top three Google links!).
Essentially, there's a new API which allows JS to request fullscreen access. That's about it.

Trying to diagnose a Google Maps/Safari Issue

Our site is able to be accessed through FF/IE/Chrome, etc. however when a user opens the site in Safari, it doesn't load the google maps box. It stays the grey loading color.
We use Google Maps v3 and geolocation to set the default position of the map, and if they deny location or something, we have a fallback to an IP service to center it somewhat close to them. Works everywhere but on Safari (multiple versions). It just hangs.
Any ideas at how I can diagnose this? I'm running Windows 7/XP so it's tough to do.
Thanks!
You can use the firebug lite version
and also have a try with the built-in developer tools.
This thread Debugging javascript in Safari for Windows says more about this.

W3C geolocation API not working on Safari 5

W3C geolocation API doesn't seem to work in safari 5.
I tried this page and it sort of tells me that Geolocation is unsuccessful.
The code:
http://code.google.com/apis/maps/documentation/javascript/examples/map-geolocation.html
can somebody explain me why this is so?
Looks like geolocation in safari only works when you're connected to wifi (not wired):
Geolocation in Safari 5
I'm using Safari 5.0.5 on Mac Snow Leopard and clicking after on your link I was getting
Error: The Geolocation service failed
Try enabling the location services in Safari.
Go to Preferences->Security and check "Allow websites to ask for location information". Also, make sure System Preferences->Security does not have "Disable Location Services" checked.
Now all works as expected and I'm getting
Location found using W3C standard
If, like me, you're working on a Mac and none of the other answers helped, check that the Safari application is permitted to determine your location:
System Preferences --> Security and Privacy --> Privacy --> Location Services --> Check the Safari checkbox.
Refresh the page, if prompted, allow Safari to obtain your location and now you should be able to see your location on the map.
The above was reproduced on OS X El Capitan.