Is it possible to disable google maps from requesting user location? - iphone

I'm guessing not, but I'm creating an app that gets the users coordinates using CLLocationManager, then passes the coordinates into Google maps to display directions. When the webpage opens to display, it requests the users location, and if the user says yes, it somehow affects some variables in my code. I was curious if the prompt from Google maps can be disabled, or if the coordinates that Google maps does take in can be retrieved by my app somewhere. I'm pretty sure neither are possible, just tossing it out there.

short answer. NO.
The location fetching in google maps app is done through JavaScript api
more details here
if you can disable the javascript the map routing itself might not work so NO.
the part about retrieving variables, I think you can check the webview shouldStartLoadWithRequest and check the url, maybe that has some information you can fetch out.

If anyone else needs it, here is an answer
let mapView = GMSMapView()
mapView.isMyLocationEnabled = false

Related

How to avoid InAppWebView to twice ask for permission to access location?

I did not find an answer to the question of how to do this in flutter.
The problem is the following:
when requesting permissions for geolocation, first the first window pops up directly for the application itself, then the second one for the WebView.
So the request for the WebView looks just disgusting, all because I'm running the WebView
locally(without a local server).
I found a similar article but it is directly for Swift, I could not figure out how to adapt it for Flutter: How to prevent WKWebView to repeatedly ask for permission to access location?
Actually my question is:
How can I get rid of that second request? Because it sure isn't great UX...
first nice request for app
second ugly request for webview

Is it possible to share your location through flutter app

I built an app in flutter, dart to access the location of the user. I now want to share the current physical location of the user via Whatsapp, email etc but not as coordinates.
I have tried geolocation as well as location but seem to only manage to get the coordinates. Below is a snippet of my share button that shows me the coordinates.
_share(){
Share.share('I have arrived safely at ${_currentLocation.latitude} & ${_currentLocation.longitude}');
}
I am expecting to see a message that can be shared to anyone on my device that provides my current location. I am not receiving any error messages as i am currently only getting the coordinates as shown in the code. What can be done to share the physical location of my device?
I have figured out that the only way to be able to share your location via a flutter app is to add the coordinates to a url string of google maps
i.e.
_share(){
Share.share('https://www.google.com/maps/search/?api=1&query=${_currentLocation.latitude},${_currentLocation.longitude}');
}

iPhone/Objective-C - UIDocumentInteractionController Class Reference when presenting a view and delegates

I am using UIDocumentInteractionController inside my application in order to present the Instagram filter screen as described here from within my application:
http://instagram.com/developer/iphone-hooks/
UIDocumentInteractionController Class Reference documentation:
I'm not quite sure whether it's possible to dismiss the Instagram filter screen and return back to my application with the modified UIImage after it has been uploaded (or maybe after it's been filtered) by Instagram.
As far as I know I don't think this is possible, as there's no delegate method that's available once an application has been spawned and this would most-likely involve a dismiss button from within the Instagram filter screen.
Either way, I'd also like to know whether there's a suitable way to at least return the URL/ID from Instagram once it's been posted so that I can reference the modified image from inside my application using either their API documentation or by just referencing the image url.
Thanks in advance and any help would be greatly appreciated.
My understanding from reading the material you provided is that using UIDocumentInteractionController to do this actually opens Instagram and switches to it. If that's true, then the only way to receive a callback or any kind of information from Instagram would be if they supported it explicitly. I encourage you to ask them by email (contact#instagr.am) or on the Google group (perhaps you already did?).
(If they did support it, I'd imagine you might be able to call up Instagram with a URL like instagram://[regular options]?callback=myapp://callback_url, which they would then open when finished.)

Link directly to Google Maps transit directions mobile site

If you visit maps.google.com on a mobile device, then press 'Menu', 'Get Directions', and select the 'transit' option, you are taken to a page where you can enter two locations and a date/time, and get directions on public transit. However, the URL is still maps.google.com.
Is there any way to link directly to this page so that I can load it in a UIWebView in my iOS app? Would 'clicking' the buttons in Javascript be (the only/a good) solution?
Try: http://www.google.com/transit
Even clicking the buttons in javascript doesn't seem to be working. The Google Maps code is a little strange- the event listeners aren't assigned directly and I can't get a .click() to work. So what I'll do is have the user enter the two locations in boxes in the app, then load something like http://maps.google.com/maps?f=d&source=s_d&saddr=Coover+Hall&daddr=lied+rec+center in the UIWebView, except I'll add some more specific location information before building the URL, since this is a city-specific app. Not a perfect solution but it gets the job done.
You could create a URL that links to the transit directions with the "dirflg=r" paramater.
Find the other URL parameters here: http://web.archive.org/web/20110714031648/http://mapki.com/wiki/Google_Map_Parameters

Unable to use Facebook Places after manually setting Geolocation in Firefox

I am having a play with Facebook Places but don't want to publish my current location for privacy reasons. I therefore changed the geo.wifi.uri in the about:config in Firefox to point to a file containing JSON of my location with the lat and long. This works great and if I test by using Google Maps or the Mozilla Geolocation test I get the location I have specified. However, if I 'Check in' via Facebook (touch.facebook.com) in Firefox I can see the location on the little Bing map but get the following error
We couldn't determine the coordinates of this location. Check if your latitude and longitude are in range, and verify the format of the location.\n
Any ideas?
Thanks
I have wired up Google Latitude to Firefox geolocation. This lets you manually update your location in Google Latitude with a single mouse click, instead of looking up your latitude and longitude yourself and typing it into a local file or URI. My article on the subject is Make Firefox Take Geolocation From Google Latitude.
I am not normally a Facebook Places user, but I browsed over to touch.facebook.com and clicked Places, and was presented with the usual permission prompt and then a list of nearby places. So the problem does not seem to be in Facebook or in Firefox. Without looking at your JSON I could not guess why it's not working.
Cheers, MetaEd