Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GeoIntegration for Google Maps
07-19-2017, 06:07 PM (This post was last modified: 07-19-2017 06:46 PM by falkoner.)
Post: #4
RE: GeoIntegration for Google Maps
In Suppliers.php lines 425-428 need to be replaced by:

$address = urlencode($_POST['Address1'] . ', ' . $_POST['Address2'] . ', ' . $_POST['Address3'] . ', ' . $_POST['Address4'] . ', ' . $_POST['Address5'] . ', ' . $_POST['Address6']);
$base_url = "http://" . MAPS_HOST . "/maps/api/geocode/xml?address=";
$request_url = $base_url . $address . ',&sensor=true';

Lines 433 to 437 need to be removed

and lines 434-435 need to be changed to:

$status = $xml->status;
if (strcmp($status, 'OK') == 0) {

Lines 438 and 439 should be removed

Lines 441 and 442 should be replaced by:

$latitude = $xml->result->geometry->location->lat;
$longitude = $xml->result->geometry->location->lng;

This should now work for the suppliers. Any problems give me a shout
Tim


Similarly in CustomerBranches.php

Lines 112 to 114 become:

$address = urlencode($_POST['BrAddress1'] . ', ' . $_POST['BrAddress2'] . ', ' . $_POST['BrAddress3'] . ', ' . $_POST['BrAddress4']);
$base_url = "http://" . MAPS_HOST . "/maps/api/geocode/xml?address=";
$request_url = $base_url . $address . ',&sensor=true';

Lines 116 to 120 should be removed.

Lines 117 to 118 become:

$Status = $xml->status;
if (strcmp($Status, 'OK') == 0) {

Lines 121 and 122 should be removed

Lines 122 and 123 should become:

$Latitude = $xml->result->geometry->location->lat;
$Longitude = $xml->result->geometry->location->lng;

Hope this all helps,
Tim

There are several changes throughout this thread that need to be applied to subversion.

Tim
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: GeoIntegration for Google Maps - falkoner - 07-19-2017 06:07 PM
RE: GeoIntegration for Google Maps - phil - 09-20-2017, 06:09 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)