Skip to content
Snippets Groups Projects
Verified Commit c9f98345 authored by skylord's avatar skylord Committed by Juraj Nemec
Browse files

Issue #3089410 by skylord: API parameter was changed for Yandex geocoder

parent 6c276aec
Branches 7.x-1.x
No related tags found
No related merge requests found
......@@ -25,7 +25,7 @@ function geocoder_admin_settings(array $form, array &$form_state) {
'#required' => FALSE,
);
$yandex_url = 'http://api.yandex.ru/maps/getkey.xml';
$yandex_url = 'https://developer.tech.yandex.ru/services/';
$form['geocoder_apikey_yandex'] = array(
'#type' => 'textfield',
'#title' => t('Yandex Maps API Key'),
......
......@@ -40,7 +40,7 @@ function geocoder_yandex($address, $options = array()) {
$params = array(
'format' => 'json',
'results' => 1,
'key' => $consumer_key,
'apikey' => $consumer_key,
'geocode' => $address,
);
$request = drupal_http_request('http://geocode-maps.yandex.ru/1.x/?' . http_build_query($params));
......@@ -86,8 +86,8 @@ function _geocoder_yandex_geometry(&$data) {
if (isset($data->error)) {
$args = array(
'@status' => $data->error->status,
'@error' => $data->error->message,
'@status' => $data->error,
'@error' => $data->message,
);
$msg = t('Yandex API has reported an error.\nStatus: @status\nError: @error', $args);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment