I have a google maps api v3 web app and I'm curious if there's a way to pass the user's coordinates and the target location to a mobile users (iphone/android) Google Maps app so they can get real time directions if they link out to their maps app from the website?
I guess I don't know how I would make the coordinates available to the phone via the website with javascript?
site is here for reference: http://52.10.135.217/
Thanks you
Related
I've used the Google Maps JavaScript API to put a bunch of markers on a map, within a web page. I'd like to allow users to choose to open the map, with markers, within the Google Maps app, should they have it on their device.
Currently the markers, when clicked, display the name of the location and some other details. I'd like to maintain this functionality within the app too.
Is there an easy way to achieve this? I'm a front-end web developer with a decent amount of JS experience, but I don't have any experience developing iOS or Android apps, and I was hoping there'd be an easy solution within the API, but haven't come across an answer. There's a good chance that this simply isn't possible due to the differences between the web and app platforms, but I just don't know.
This is a built-in feature of the Google Maps iOS (and thus I assume Android) API. In the iOS API, add the following entry in Info.plist file:
LSApplicationQueriesSchemes
Item 0... String... googlechromes
Item 1... String... comgooglemaps
And then whenever a marker is tapped in the app, if the user then taps the Google attribution logo (usually at the bottom of the screen), the Google Maps app will open that marker. These entries allow for that to happen.
The Android guys can speak to Android but I'm sure it's as simple, if not simpler. Here are some methods: How to open standard Google Map application from my application?
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 writing a web app(html5 and angular) where I use google maps to create a route. If the user uses the web app via mobile phone I would like to open a native google map app to show the route turn-by-turn navigation. Is this possible?
Thank you
Edit: I can invoke a native with the following link right?
http://maps.google.com/maps?saddr=New+York&daddr=San+Francisco
Is it possible for me add waypoints in between?
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.