Beruflich Dokumente
Kultur Dokumente
/*global MashupPlatform*/
(function () {
"use strict";
var icon;
var entity;
var updateMarkerIcon = function updateMarkerIcon() {
alert(entityString);
icon = MashupPlatform.prefs.get('marker-icon');
if (icon == '') {
icon = internalUrl('images/icon.png');
}
};
MashupPlatform.wiring.registerCallback("entityInput", function (entityString)
{
var entity = JSON.parse(entityString);
MashupPlatform.prefs.registerCallback(updateMarkerIcon(entity));
var coordinates = null;
var coord_parts = null;
var coordinates_pref = MashupPlatform.prefs.get('coordinates_attr');
var attributes = coordinates_pref.split(new RegExp(',\\s*'));
if (attributes.length < 1) {
return;
} else if (attributes.length >= 2 && entity[attributes[0]] != null &&
entity[attributes[1]] != null) {
coord_parts = [
entity[attributes[0]],
entity[attributes[1]]
];
} else if (entity[attributes[0]]) {
coord_parts = entity[attributes[0]].split(new RegExp(',\\s*'));
}
return poi;
};
return infoWindow;
};
})();