I have added google maps to OSticket. If you are interested.

I added some fields for address etc... and then used google geocode to get the latitude and longitude then I have a map with dynamic locations added.

class.ticket.php

//Google GeoCode//

$street=$var;

$city=$var;

$zipcode=$var;

$state=$var;

$name=$var;

$fulladdress=$var . ", " . $var . ", " . $var . ", " . $var;

$mapaddress = urlencode("$street $city $state $zip");`

$address = "http://maps.google.com/maps/geo?q=$mapaddress&output=xml&key=ABQIAAAApk0aQOp44NFPU4ZdeWyxWhTipz4yP5EDROHI6lYTKf-B6CsaCxQgMO29u0dhXWEHvXReWbcAC-Bn4w";

$page = file_get_contents($address);

$xml = new SimpleXMLElement($page);

$coordinates = $xml->Response->Placemark->Point->coordinates;

$coordinatesSplit = split(",", $coordinates);

$lat = $coordinatesSplit;

$lng = $coordinatesSplit;

//Google GeoCode//

In the newticket.inc.php file I added the form fields that send the values above to this file class.ticket.php

9 days later

Any chance of screenshots? Would love to see and perhaps integrate into our install as well!

Thanks.

3 months later

not working

not working for me. i added the these to my osticket, getting white page.

can you please provide step by step guide ? and screenshots

a year later
12 years later

You will first need to configure the Embedded Domain Whitelist setting in Admin Panel > Settings > System (please read the help tip for more information).

I solved it by putting the "google.com" site on the white list.

Write a Reply...