5

I have searched in many places but I couldn't find the answer for this.

The thing is I want to display the users current location in the Web page just as a text without using Maps and pointing to that.

Many places I saw used Maps for implementation, is there any way ?

Thanks in advance :)

6 Answers6

3

You can use HTML5 Geolocation feature: http://html5demos.com/geo

MarcinJuraszek
  • 124,003
  • 15
  • 196
  • 263
1

try the google maps api (v3) geocoding stuff: https://developers.google.com/maps/documentation/javascript/geocoding#GeocodingAddressTypes

there would be a possibility to simple write down the current location (as street or city)

EnrageDev
  • 91
  • 6
1

HTML5 Geolocation has already been mentioned, but I recommend you use PHP Geo IP Location as a fallback - it derives a coarse location from the IP address even if the user doesn't allow the HTML5 location request or uses a browser, that doesn't support it.

Eugen Rieck
  • 64,175
  • 10
  • 70
  • 92
1

In your webpage use JavaScript to get client IP. Then use IP to location conversion web services to map the IP address of the client to the physical location.

Kara
  • 6,115
  • 16
  • 50
  • 57
mujjiga
  • 16,186
  • 2
  • 33
  • 51
0

By lattitude and Longitude values only you can the location you can use this following link in your program.This link will return a xml file having details and you can parse and get the location name.Hope it helps

http://api.geonames.org/findNearbyPlaceName?lat=47.3&lng=9&username=demo

and once check this post

Get latitude and longitude automatically using php, API

First you need a geographic location for each hotspot ideally using latitude and longitude. You can use the Google Geocoding API to go through each record and store lat/long.

Community
  • 1
  • 1
ɹɐqʞɐ zoɹǝɟ
  • 4,342
  • 3
  • 22
  • 35
0

I'm not sure if this is what you are looking for, but it is pretty simple to implement. Hope this works for you. All the best! http://gonga.in/simple-location-tracker-script/