File "Address.php"

Full Path: /home/capoeirajd/www/wp-content/plugins/wpforms-lite/vendor_prefixed/apimatic/jsonmapper/example/Address.php
File size: 422 bytes
MIME-type: text/x-php
Charset: utf-8

<?php

namespace WPForms\Vendor;

class Address
{
    public $street;
    public $city;
    public function getGeoCoords()
    {
        $data = \file_get_contents('http://nominatim.openstreetmap.org/search?q=' . \urlencode($this->street) . ',' . \urlencode($this->city) . '&format=json&addressdetails=1');
        $json = \json_decode($data);
        return array('lat' => $json[0]->lat, 'lon' => $json[0]->lon);
    }
}