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.
Related
We're using google maps to display company locations on a map. It still works in Chrome, Firefox & Safari currently, however in IE 11 today we noticed that none of the tiles are loading and we get grey tiles with a text saying "Sorry, we have no imagery here". I checked the network tab and it looks like, the tile requests are trying to fetch the tiles from the domain, where the map is displayed instead of fetching them from the google servers.
I tried changing the version parameter to v=weekly and v=3.3.6, but it still behaves the same.
The map is embedded like this:
<script src="https://maps.googleapis.com/maps/api/js?key={API_KEY}&v=3.exp" defer></script>
in IE11 the tile request looks like this:
https://example.com/google-maps-page/undefinedpb=!1m5!1m4!1i6!2i34!3i21!4i256!2m3!1e0!2sm!3i480189574!3m14!2sen-US!3sUS!5e18!12m1!1e68!12m3!1e37!2m1!1ssmartmaps!12m4!1e26!2m2!1sstyles!2zcy50OjJ8cy5lOmx8cC52Om9mZg!4e0&key={API_KEY}&token={TOKEN}
in chrome the working tile-requests look like this:
https://maps.googleapis.com/maps/vt?pb=!1m5!1m4!1i6!2i31!3i22!4i256!2m3!1e0!2sm!3i480189574!3m14!2sde-DE!3sUS!5e18!12m1!1e68!12m3!1e37!2m1!1ssmartmaps!12m4!1e26!2m2!1sstyles!2zcy50OjJ8cy5lOmx8cC52Om9mZg!4e0!5m1!5f2&key={API_KEY}&token={TOKEN}
We are also encountering the same problem.
Switching to v=3.36 solves this for now, but 3.36 will be removed next update, where it will default to the "v=quarterly" response.
I had the same issue, my site is using es6-shims library, but once I change it to core-js library, google maps 3.38 works well in IE11, not sure if it is a google maps issue or es6-shims issue.
Without any shims google maps 3.38 does work in IE11, so the issue could be incompatibility between es6-shims and latest google maps
Recently I noticed that geolocation doesn't work on Firefox when using Google Maps API. After googleing for a while, I tried showing my current location (from a laptop, not from mobile) on Google Maps, but it didn't work there as well.
Here's what I have in my geo.wifi.uri in the about:config Firefox's tab:
https://www.googleapis.com/geolocation/v1/geolocate?key=%GOOGLE_API_KEY%
Can anyone help me?
I faced the same problem, and from what I found, we can't use Google's Geolocation unless we get our own API key. If you don't mind, you can use Mozilla's Geolocation, but the results will be different from Google's.
You can change https://www.googleapis.com/geolocation/v1/geolocate?key=%GOOGLE_API_KEY% to https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%
Source
I made this static map image-link to put on our website. The map works in Chrome on Mac OS 10.6.8 but it doesn't show on iOS7.1. Ive tried both on iPhone 4s and iPad2. The only thing I get on iOS7 is a blank square.
If I paste the link in the Safari adress-field on my iPad I can see the map.
here's the link:
http://maps.googleapis.com/maps/api/staticmap?center=62.388298,17.316515&zoom=15&size=300x300&scale=2&markers=color:red%7C62.388298,17.316515&maptype=roadmap&sensor=false&key=
Since I havent managed to figure this out myself Ive currently made a clickable link for iOS/Android users but Im not sure if Im supposed to do that..
thx
Why not using the maps api v3? I get the follwing error in chrome on windows:
The Google Maps API server rejected your request. This IP, site or mobile application is not authorized to use this API key.
On v3 of the maps api you donĀ“t need a key.
Eventually this solves your problem.
I have developed a javascript API application that retrieves Google Streetview images based on where a user clicks on an interactive map.
For some reason in the past couple of days there have been intermittent issues with this process as a grey screen is just returned and it isn't until you start to pan around that an image is returned.
The same thing happens in Google's own API example here:-
http://code.google.com/apis/maps/documentation/javascript/examples/streetview-service.html
After the initial click, subsequent clicks just return a grey screen (this is in Internet Explorer 7, it appears to work in Google Chrome and Firefox).
This didn't used to be a problem - has anyone else experienced this issue when using Internet Explorer (either version 7 or another)?
Thanks
I think this is a bug in the 3.8 nightly api build.
Specify a specific api build.
http://maps.googleapis.com/maps/api/js?v=3.7&sensor=true_or_false
Google documentation reference
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.