/**
  * {@inheritDoc}
  */
 public function populateAddress(AddressInterface $address, array $data)
 {
     return $address->setFullAddress($data['resourceSets'][0]['resources'][0]['name']);
 }
 /**
  * {@inheritDoc}
  */
 public function populateAddress(AddressInterface $address, array $data)
 {
     $fullAddress = $this->constructAddress($data);
     return $address->setFullAddress($fullAddress);
 }
 /**
  * {@inheritDoc}
  */
 public function getCoordinates(AddressInterface $address)
 {
     $coordinates = $this->populate(Hydrator::TYPE_COORDINATES, $this->client->get(sprintf('%s/address?outFormat=json&location=%s&key=%s', $this->api_endpoint, $address->getFullAddress(), $this->api_key))->send()->json());
     $this->logger->debug('Locate coordinates by address', array('provider' => 'mapquest', 'address' => $address->getFullAddress(), 'latitude' => $coordinates->getLatitude(), 'longitude' => $coordinates->getLongitude()));
     return $coordinates;
 }
 /**
  * {@inheritDoc}
  */
 public function populateAddress(AddressInterface $address, array $data)
 {
     $fullAddress = $this->constructAddress($data[0]['Result'][0]['Location']['Address']);
     return $address->setFullAddress($fullAddress);
 }
 /**
  *
  */
 public function populateAddress(AddressInterface $address, array $data)
 {
     return $address->setFullAddress($data[0]['formatted_address']);
 }
 /**
  * {@inheritDoc}
  */
 public function getCoordinates(AddressInterface $address)
 {
     $coordinates = $this->populate(Hydrator::TYPE_COORDINATES, $this->client->get(sprintf('%s?searchtext=%s&app_id=%s&app_code=%s&gen=8maxresults=1', $this->api_endpoint, $address->getFullAddress(), $this->app_id, $this->app_code))->send()->json());
     $this->logger->debug('Locate coordinates by address', array('provider' => 'heredotcom', 'address' => $address->getFullAddress(), 'latitude' => $coordinates->getLatitude(), 'longitude' => $coordinates->getLongitude()));
     return $coordinates;
 }
 /**
  * {@inheritDoc}
  */
 public function getCoordinates(AddressInterface $address)
 {
     $coordinates = $this->populate(Hydrator::TYPE_COORDINATES, $this->client->get(sprintf('%s/?geocode=%s&lang=en-US&format=json&results=1', $this->api_endpoint, $address->getFullAddress()))->send()->json());
     $this->logger->debug('Locate coordinates by address', array('provider' => 'yandex', 'address' => $address->getFullAddress(), 'latitude' => $coordinates->getLatitude(), 'longitude' => $coordinates->getLongitude()));
     return $coordinates;
 }
 /**
  * {@inheritDoc}
  */
 public function getCoordinates(AddressInterface $address)
 {
     $coordinates = $this->populate(Hydrator::TYPE_COORDINATES, $this->client->get(sprintf('%ssearch/%s?o=json', $this->api_endpoint, $address->getFullAddress()))->send()->json());
     $this->logger->debug('Locate coordinates by address', array('provider' => 'nominatim', 'address' => $address->getFullAddress(), 'latitude' => $coordinates->getLatitude(), 'longitude' => $coordinates->getLongitude()));
     return $coordinates;
 }