- $('.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: params.lat,
- lon: params.lon,
- zoom: params.zoom || 17,
- editor: params.editor
- };
-
- $('.start-mapping').attr('href', '/edit?' + $.param(params));
+ params.lat = parseFloat(params.lat);
+ params.lon = parseFloat(params.lon);
+ params.zoom = params.zoom || 17;