/usr/share/horde/ansel/js/blocks/geotag.js is in php-horde-ansel 3.0.5+debian0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | AnselBlockGeoTag = Class.create({
_map: null,
_imgs: null,
initialize: function(imgs, opts)
{
this.opts = opts;
AnselMap.initMainMap('ansel_map', {
'onHover': function() { return true },
'onClick': function(f) {
var uri = f.feature.attributes.image_link;
location.href = uri;
}.bind(this),
'defaultBaseLayer': opts.defaultBaseLayer,
'onBaseLayerChange': this.updateBaseLayer.bind(this)
});
this.placeImages(imgs);
},
/**
* Place image markers on the map.
*
* @param array imgs An array of image definition hashes.
*/
placeImages: function(imgs)
{
// Place the image markers
for (var i = 0; i < imgs.length; i++) {
var m = AnselMap.placeMapMarker(
'ansel_map',
{
'lat': imgs[i].image_latitude,
'lon': imgs[i].image_longitude
},
{
'img': (!imgs[i].markerOnly) ? imgs[i].icon : Ansel.conf.markeruri,
'background': (!imgs[i].markerOnly) ? Ansel.conf.pixeluri + '?c=ffffff' : Ansel.conf.markerBackground,
'image_id': imgs[i].image_id,
'markerOnly': (imgs[i].markerOnly) ? 'markerOnly' : 'noMarkerOnly',
'center': true,
'image_link': imgs[i].link
}
);
}
},
updateBaseLayer: function(l)
{
new Ajax.Request(this.opts.layerUpdateEndpoint, {
method: 'post',
parameters: {
pref: this.opts.layerUpdatePref,
value: l.layer.name
}
});
}
});
|