Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get the Google Map based on Latitude on Longitude?

I want to display Google map in my web page based on longitude and latitude. First user want to enter longitude and latitude in two text box's. Then click submit button I have to display appropriate location in Google map.And also I want to show the weather report on it.How to do that? Thank You.

like image 473
Gnaniyar Zubair Avatar asked Feb 24 '11 04:02

Gnaniyar Zubair


People also ask

Can you search Google Maps with latitude and longitude?

To search for a place, enter the latitude and longitude GPS coordinates on Google Maps. You can also find the coordinates of the places you previously found. Besides longitude and latitude, you can use plus codes to share a place without an address.

How do you search latitude and longitude on Google Earth?

Use coordinates to search Open Google Earth. In the Search box in the left-hand panel, enter coordinates using one of these formats: Decimal Degrees: such as 37.7°, -122.2° Degrees, Minutes, Seconds: such as 37°25'19.07"N, 122°05'06.24"W.


1 Answers

Create a URI like this one:

https://maps.google.com/?q=[lat],[long]

For example:

https://maps.google.com/?q=-37.866963,144.980615

or, if you are using the javascript API

map.setCenter(new GLatLng(0,0)) 

This, and other helpful info comes from here:

https://developers.google.com/maps/documentation/javascript/reference/?csw=1#Map

like image 96
jsw Avatar answered Oct 03 '22 22:10

jsw