I configured a service call to get altitude using the srtm3 service, but it seems the service is not returning the expected value when the call is made by the geonames module. This is what I am getting:

[
stdClass Object
(
[standalone] => no
[total_results_count] => 0
[service] => srtm3
[request] => Array
(
[url] => http://ws.geonames.org/srtm3?type=xml&lng=19.000935279376&lat=48.4806010...
[bytes] => 151
[cached] => result
[seconds] => 0.0085089206695557
)

[query] => Array
(
[type] => xml
[lng] => 19.000935279376
[lat] => 48.480601006883
)

)
]

When I call the service from my web browser I see the returned XML contains the altitude. Maybe I do not understand what should I do with the service-call result object (I do not really "speak" php - yet).

Thank you

CommentFileSizeAuthor
#2 Execute PHP Code | localhost.jpg100.5 KBlyricnz

Comments

lyricnz’s picture

Geonames module does not support this particular service at the moment (since its results are in a different format to most other services - see #619670: Support remaining Geonames services).

lyricnz’s picture

Status: Active » Fixed
StatusFileSize
new100.5 KB

I have added support for this service. Now when you use:

$query = array('lat' => 50.01, 'lng' => 10.2);
$results = geonames_query('srtm3', $query);
dsm($results);

you get results like attached image. Fixed in dev.

sano’s picture

Excellent. Thank you.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.