summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chimere/static/chimere/img/cursor.pngbin0 -> 4366 bytes
-rw-r--r--chimere/static/chimere/js/jquery.chimere.js23
2 files changed, 15 insertions, 8 deletions
diff --git a/chimere/static/chimere/img/cursor.png b/chimere/static/chimere/img/cursor.png
new file mode 100644
index 0000000..519061f
--- /dev/null
+++ b/chimere/static/chimere/img/cursor.png
Binary files differ
diff --git a/chimere/static/chimere/js/jquery.chimere.js b/chimere/static/chimere/js/jquery.chimere.js
index 8809655..9d4489e 100644
--- a/chimere/static/chimere/js/jquery.chimere.js
+++ b/chimere/static/chimere/js/jquery.chimere.js
@@ -120,6 +120,7 @@ function category_loaded_callback(cat_numbers){
icon_start: null,
icon_step: null,
icon_end: null,
+ icon_current_position: null,
mobile: false,
input_id: 'id_point'
};
@@ -158,6 +159,12 @@ function category_loaded_callback(cat_numbers){
new OpenLayers.Size(32, 32),
new OpenLayers.Pixel(0, -32));
}
+ if (defaults.icon_current_position == null && typeof STATIC_URL != 'undefined'){
+ defaults.icon_current_position = new OpenLayers.Icon(
+ STATIC_URL + "chimere/img/cursor.png",
+ new OpenLayers.Size(32, 32),
+ new OpenLayers.Pixel(0, 0));
+ }
settings = $.extend({}, defaults);
if ( options ) $.extend(settings, options);
if (settings.controls == null){
@@ -1278,17 +1285,17 @@ function category_loaded_callback(cat_numbers){
updateMyCurrentPosition: function(options){
if (settings.current_position_marker) {
- settings.layerMarkers.removeMarker(settings.current_position_marker)
+ settings.layerRouteMarker.removeMarker(
+ settings.current_position_marker);
}
- var tmp_position = new OpenLayers.LonLat(options["lon"], options["lat"]);
- tmp_position = tmp_position.transform(EPSG_DISPLAY_PROJECTION,
-
-
- settings.map.getProjectionObject());
+ var tmp_position = new OpenLayers.LonLat(
+ options["lon"], options["lat"]);
+ tmp_position = tmp_position.transform(
+ EPSG_DISPLAY_PROJECTION,
+ settings.map.getProjectionObject());
settings.current_position_marker = new OpenLayers.Marker(
- tmp_position.clone(),
- settings.icon_current_position);
+ tmp_position.clone(), settings.icon_current_position);
settings.layerRouteMarker.addMarker(settings.current_position_marker);
},