I have integrated Google Maps in my application using their Javascript API.
I have a requirement to popup an Information Dialogue and show a static map image when there is no internet connection available, but google Map is already launched on the browser.
Does google javascript Map API provides a handle/response when i zoom or pan while it is fetching the image tiles and no internet connection available ?
No,It's not possible to handle google maps javascript api without internet connection you must have active internet connection.
Related
Im trying to get my Iphones live location to show on a map on my website.
Is there a way to acomplish this easily using HTML5 Geolocation or is it better to use Google Maps Geolocation API, or some other library?
Thanks.
I use Google Maps Geolocation API in WEB APP developed with .NET C #
And it was great
At HyperTrack we have an SDK which you can plugin to your app in as little as 3 lines of code and automatically enable location tracking in your application and view (for free) on our Dashboard. In our Sandbox mode (read: Test Mode) you can track and assign actions for up to 20 users for free as well. This mode also gives you an Action Widget that you can embed anywhere to see the activity of your user(s)/device(s).
For iOS you can visit our iOS Integration Guide.
We have tried using the Google Places API on iOS and Google Places Web Service to get a verified SAB (service area business), that is a business that has an address but that does not have a physical location, rather it serves a certain area.
Here is an example business "Japanese Mobile Hairdresser Scissor Paper Rock" that you can try.
After trying nearby, textsearch, autocomplete and other APIs we came to the conclusion that because there is no physical address and the business actually just serves an area it makes sense that the Google Places API does not return this business or any other SAB.
Using Google Maps directly though does return the business and so does the sample that Google has on this page about the js API
https://developers.google.com/maps/documentation/javascript/examples/places-placeid-finder
Also searching around on the internet you will find articles like this
https://productforums.google.com/forum/#!topic/map-maker/0-0wplytssg
that seem to suggest that although SABs will not show on a map they will return in the search results of a map as the above sample suggest and also using Google Maps directly.
Logically then we tried to create a web page that uses the js API example to see if we can search for the "Japanese Mobile Hairdresser Scissor Paper Rock" business only to find out that although it gets returned by Google's sample when we add our API key and host that file on a server neither this business nor any other SAB gets returned.
Has anyone else experienced this problem? Is there any way to get SABs by using any of the available APIs from Google, whether it is Google Maps or Google Places or any other? Do you know if Google returns different results on their maps rather than the APIs?
FYI all these APIs are enabled on the Google Console API
Google Places API for iOS
Google Places API Web Service
Google Maps SDK for iOS
Google Maps JavaScript API
Google Maps Geocoding API
Any help would be greatly appreciated.
I'm currently working on a platform that will be launched all over the world and I am working in Shanghai China and as you might know there is a very big Firewall policy here.
The site contains a custom map view created with the Google Maps API this is because Google allows a lot of nice features to change the look and feel of the map.
But now I'm running into a problem where if a user wants to access the site without VPN the whole page where the map is located slows down,crashes and breaks my login procedure.
Here are the errors showing in the Console View:
GET https://maps.googleapis.com/maps/api/js?key=1010101010101&sensor=true net::ERR_CONNECTION_TIMED_OUT
Uncaught ReferenceError: google is not defined
I want to know if there is a way to check if I have a connection to the Google Maps API before executing the code?
Cheers,
Koen
Checking if the API is loaded, as Keith links above, is a good way to see if the loading has had any trouble.
To minimize problems loading the API in China the Maps API FAQ recommends loading the API from http://maps.google.cn/maps/api/js and not using https.
I have a custom made tile for google map. Works perfectly fine online, but when I turn off data on my phone, it just shows the loading icon, as it can't communicate with google.
As I have my own tiles, is it possible to use google maps offline with phonegap?
I don't believe it is possible to use Google's API offline. However, If you have your own tiles, and have them embedded within your application archive, you could use Leaflet to render the local tiles. http://leafletjs.com/ If your custom tiles are remote (hosted on a server), then you're still not going to be able to consume them in an offline scenario.
What is the good way to add a google map with geolocation and route info facility for a mobile website which is for iphone and Android?
I want like when user will open the web page he will get the permission message to use his location and when he will permit the map will load on the page with user's location.
Here is the explanation of process https://cacoo.com/diagrams/rlKiNG7rezQOeTlC
You could always try out the jquery mobile google maps plugin. See the jQuery mobile examples.