Google maps url to goole maps sdk - swift

Can I use shared location or route url via google maps in sdk. For example, can I open the route url I created on google maps in my own application? example link: https://goo.gl/maps/n15Bt48Bu5nWap8B8
Thanks

Yes you can use roads API
https://developers.google.com/maps/documentation/roads/snap
The Roads API takes up to 100 GPS points collected along a route, and returns a similar set of data, with the points snapped to the most likely roads the vehicle was traveling along. Optionally, you can request that the points be interpolated, resulting in a path that smoothly follows the geometry of the road.

Related

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}');
}

Get capture date from mapbox satellite imagery

I am following the mapbox tutorial here. I have the static map displaying nicely inside of my web page. I would like to include a capture date on the image provided by map box.
I am using the mapbox.satellite mapId. So, my url looks like this:
https://api.mapbox.com/v4/mapbox.satellite/${lng},${lat},19/1000x700.jpg90?access_token=${accessToken}
My access token is provided by Digital Globe in a trial account. Does anyone know if the capture date is available, and if so, how to retrieve it?

Bing maps pushpins in REST

I am using bing maps REST services and I need to add pushpins but surprisingly it's giving me a hard time. I found out how to easily add pushpins in AJAX services, but that would need me to include scripts and stuff to my pages which I'd really rather skip. I tried searching the internet for information on how to add pushpins in REST ( or simply an iframe with a URL ) but I failed to find any useful such. Does anyone know how I can add pushpins in REST?
EDIT: I'm using dynamic maps based on this link http://www.bing.com/maps/embed/viewer.aspx?showCopyright=false&cp=43.835109710693~25.957630157471&lvl=1&w=250&h=350&sty=r
Assuming that you are using the Bing Maps Imagery REST service, you will be able to add pushpin based on the URL parameters, see the MSDN: http://msdn.microsoft.com/en-us/library/ff701724.aspx
Here is an sample request that will allow you to add pushpins, take a look at the pp parameter:
http://dev.virtualearth.net/REST/v1/Imagery/Map/Road/47.619048,-122.35384/15?mapSize=500,500&pp=47.620495,-122.34931;21;AA&pp=47.619385,-122.351485;;AB&pp=47.616295,-122.3556;22&key=BingMapsKey
If you are using embedded maps, here is the list of parameters: http://msdn.microsoft.com/en-us/library/ee692180.aspx

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

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

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