I picked location on my Google map. I want to create a link from it
How can I do it? I did not find any posts about it
I have latitude and longitude
I need a link like this: https://www.google.com/maps/place/XL+Center/#41.768399,-72.6794744,17z/data=!4m5!3m4!1s0x89e6549e9033c1df:0x2222bb5c74fa750c!8m2!3d41.768399!4d-72.679174
Well, if you just want a link of Location, then this thread can help you with that.
Here is a different way or option to get the link of Google Maps with address or location.
Place/Address
https://www.google.com/maps/place/760+West+Genesee+Street+Syracuse+NY+13204
Directions (with or without starting point)
https://www.google.com/maps/dir/760+West+Genesee+Street+Syracuse+NY+13204/314+Avery+Avenue+Syracuse+NY+13204 >
https://www.google.com/maps/dir//760+West+Genesee+Street+Syracuse+NY+13204
Directions (detect user’s current location as starting point)
https://www.google.com/maps/dir/Current+Location/760+West+Genesee+Street+Syracuse+NY+13204
Directions (with latitude / longitude coordinates)
https://www.google.com/maps/dir/Current+Location/43.12345,-76.12345 - Directions (multiple destinations from set location)
https://www.google.com/maps/dir/760+W+Genesee+St+Syracuse+NY+13204/314+Avery+Ave+Syracuse+NY+13204/9090+Destiny+USA+Dr+Syracuse+NY+13204
Query Search
https://www.google.com/maps/search/food/43.12345,-76.12345,14z
Destination Query
https://www.google.com/maps/dir/Current+Location/Pinckney+Hugo+Group
Linking to Google Street View
http://maps.google.com/maps?layer=c&cbll=43.053522,-76.165687
For more information, check also these link and thread.
Related
I already have the user's current location in form of Lat and Lon in my view controller , what I'm missing is comparing those user location with a file or gpx of the location that I want to compare to , my idea is that when the user drives or get the place for example a college the app will said "welcome to blag bla college ...
Thanks . I'm using Xcode and swift .
Create a CLLocation object for the user's location, and another one for the second location. then use the CLLocation method distanceFromLocation: to calculate the distance.
I want to show user location and other object location on custom map as follows :
For that I have Googled the things that says "we need to convert the lat long data in to X Y Coordinates in the image and then we need to show it on image"
Other option I found is geocode the image to show the location data.
I didn't find anything else other than this. Can anyone please guide me to show user current location on the custom map as follows?
For translating your lattitude and longitute you should know the projection of your custom map. Then you can use PROJ.4 open source library to convert them. Or you can hardcode translation function to you app. For example, here at GitHub you may found code to translate from lat&lon to EPSG:900913 (google mercator projection)
I´ve been reading the documentation of the Google Maps SDK for iOS and I didn't see anything about voice navigation direction and route on the map.
Do anyone know about this?
I correct my previous answer this is possible. You use the google directions API as outlined in this link:
You send your direction request and it returns the directions either as json or xml as per your preference. Gives you coordinates of each point on the route.
You send a request to http://maps.googleapis.com/maps/api/directions/outputformat?parameters
So if you want to return the directions as json the request would be:
http://maps.googleapis.com/maps/api/directions/json?origin=ORIGIN_LOCATION&destination=DESTINATION_LOCATION&sensor=FALSE
the ORIGIN_LOCATION and DESTINATION_LOCATION can either be a latitude and longitude seperated by a comma e.g. latitude,longitude or a location search string e.g Eiffel+Tower+,+Paris+France (The search string has to be url encoded).
The sensor parameter is another compulsory parameter and asks whether the device sending the request can detect its own location.
For example for the directions from the eiffel tower to the louvre museum are given on the following link as json:
http://maps.googleapis.com/maps/api/directions/json?origin=Louver+museum+Paris&destination=Eiffel+Tower+Paris+France&sensor=false
And to return it as XML:
http://maps.googleapis.com/maps/api/directions/xml?origin=Louver+museum+Paris&destination=Eiffel+Tower+Paris+France&sensor=false
I am having a bit of trouble sifting through the twitter API. I am trying to search for tweets near a certain location and then see their exact (or approximate) geo coordinates. I understand the geo field is deprecated and now we are supposed to use the "place" field. Unfortunately when I use the following url: http://search.twitter.com/search.json?q=&geocode=30.1829,-97.832,10mi I get a bunch of responses with a location that matches the city of the geo coordinates, but geo: is null and there is no place field. Am I stuck with only having an accuracy up to city coordinates, or am I using the wrong search call?
Thanks in advance!
Remember, tweeting with a geo location is an opt-in process. Twitter will supply a feed from the area for all tweeters in that area, but only those who have opted to tweet their coordinates will show up with "geo" info.
Using q=here with your url it did return 1 tweet for me with "geo" info in this form (though likely it will have moved on down the timeline by the time you try...):
"geo":{"coordinates":[-33.9769,18.5080],"type":"Point"}
Every user has a user defined location set in their profile settings. Use this when users don't use geo-encoding.
You can obtain a list of all countries / states by country and do a simple clean-up operation on the dataset.
This gave me what I needed for location data and greatly enriched my output.
Here's user story:
User enters address: Paris, France. Then I would like to display google map center on Paris with one movable marker. Then user point with marker to its exact location and clicks save. Address string and map coordinates are saved to database.
After some search I know I can display google map with variuos gems: cartographer for example. My question is how to get coordinates or how to pass address to cartographer so it centers map in Paris?
I agree, geokit is pretty useful...you can do things like:
require 'geokit'
include GeoKit::Geocoders
coords = MultiGeocoder.geocode(location)
puts coords.lat
puts coords.lng
Where location is a string location (like an address). It works pretty well.
You can ALSO reverse geocode, which pulls a string address out of a lat/lng coordinate pair. Pretty spiffy.
Another geocoder option for Ruby is Geocoder: https://github.com/alexreisner/geocoder
location = Geocoder.search( ... )
location[0].latitude
location[0].longitude
I suggest the gem and plugin geokit. It does exactly what you are looking for and more.