Port to new django version - not yet fully working
- location field makes problems
This commit is contained in:
@@ -40,14 +40,14 @@
|
||||
theObject.placeMarker( l );
|
||||
theObject.saveToInputField();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
this.placeMarker = function( location )
|
||||
{
|
||||
this.marker.setPosition( location );
|
||||
this.map.setCenter( location );
|
||||
this.map.panTo( location );
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
this.geocode = function(address, cb)
|
||||
@@ -60,7 +60,7 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
this.geocode_reverse = function( cb)
|
||||
{
|
||||
@@ -71,13 +71,13 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
this.saveToInputField = function()
|
||||
{
|
||||
var p = this.marker.getPosition();
|
||||
coordinate_field.value = p.lat().toFixed(6) + "," + p.lng().toFixed(6) + "," + this.map.getZoom() ;
|
||||
}
|
||||
};
|
||||
|
||||
this.loadFromInputField = function()
|
||||
{
|
||||
@@ -95,7 +95,7 @@
|
||||
this.placeMarker( init_position );
|
||||
this.map.setZoom( 16 );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// --------------------------- Constructor -------------------------------------
|
||||
@@ -118,7 +118,7 @@
|
||||
});
|
||||
|
||||
theObject.loadFromInputField();
|
||||
}
|
||||
};
|
||||
|
||||
this.init();
|
||||
}
|
||||
@@ -169,7 +169,7 @@
|
||||
$dialogElement[0].map.placeMarkerUsingAddressString( $dialogLocationField.val() );
|
||||
|
||||
$dialogLocationField.on("keypress", function(e) {
|
||||
if ( e.keyCode == 13 ) { // enter
|
||||
if ( e.keyCode === 13 ) { // enter
|
||||
$dialogElement[0].map.placeMarkerUsingAddressString( $dialogLocationField.val() );
|
||||
return false;
|
||||
}
|
||||
@@ -184,7 +184,5 @@
|
||||
|
||||
$dialogElement.dialog('open');
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user