- $('.edit-located').show();
-
- $.ajax({
- url: "http://nominatim.openstreetmap.org/reverse",
- data: {
- lat: params.lat,
- lon: params.lon,
- zoom: 10
- },
- success: function(xml) {
- var result = $(xml).find('result');
- if (result.length) {
- $('.edit-located').hide();
- $('.edit-geocoded').show();
- $('.edit-geocoded-location').text(result.text());
- }
- }
- });
+ params.lat = parseFloat(params.lat);
+ params.lon = parseFloat(params.lon);
+ params.zoom = params.zoom || 17;