Jump to content

Search the Community

Showing results for tags 'geocode'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 3 results

  1. Hi, My codes does not show any Latitude or Longitude but it did last night when I started writing this code?! $postcode = 'BN113ED'; $response = file_get_contents('http://maps.googleapis.com/maps/api/geocode/json?address=' . urlencode($postcode) . '&sensor=true'); $response = json_decode($response); $lat = $response->results[0]->geometry->location->lat; $long = $response->results[0]->geometry->location->lng; here is the URL that shows the JSON http://maps.googleapis.com/maps/api/geocode/json?address=bn113ed&sensor=true
  2. I need a map which locates all the stores addresses(Less than 10). Those address must be retreived from the database. But the database don't contain any lat or long field. Therefore geocoding an address into their corresponding lat and long coordinates must be done and appropriate markers must be placed. The code which I have at the moment is as follows:- <?php require_once '../model/stores.php'; $obj=new Stores(); $result=$obj->getStores(); $new_array = array(); while($row=mysql_fetch_assoc($result)){ $new_array[] = $row['stores_address']; } $add_js = json_encode( $new_array ); ?> <html> <head> <style> #map_canvas { width: 500px; height: 500px; } </style> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script> <script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script> <script> $(document).ready(function () { var map; var elevator; var myOptions = { zoom: 1, center: new google.maps.LatLng(0, 0), mapTypeId: 'terrain' }; map = new google.maps.Map($('#map_canvas')[0], myOptions); //var addresses = ['Norway', 'Africa', 'Asia','North America','South America']; var addresses = <?php echo $add_js ?>;; for (var x = 0; x < addresses.length; x++) { $.getJSON('http://maps.googleapis.com/maps/api/geocode/json? address=' +addresses[x]+'&sensor=false', null, function (data) { var p = data.results[0].geometry.location var latlng = new google.maps.LatLng(p.lat, p.lng); new google.maps.Marker({ position: latlng, map: map }); }); } }); </script> </head> <body> <div id="map_canvas"></div> </body> </html> I have looked on various forums and other web resources but no use as none of them worked out for me...Hope any genius would help me to solve the problem.
  3. hello, i want to get the exact coordinates of IP address - latitude, longitude. i am using google geocode but it needs to confirm that you want to share the information. after that i tried other methods - ipinfodb.. and others api but they didnt give me the same coordinates as google. is there any way ?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.