I am using the following client side code and it works in Chrome, IE8, IE9, but not FireFox. I have tested on multiple different machines.
Please Help.
Thanks,
Eric
function markerClick(e) {
var iconId = e.srcElement.parentNode.id;
var bool = e.shiftKey;
for (var i = 0; i < this.markers.length; i++) {
if (this.markers.icon.imageDiv.id == iconId) {
selectedMarker = this.markers;
if (bool == false) {
if (typeof hospitalPopup == 'function') { hospitalPopup(selectedMarker.id); }
}
if (bool == true) {
getHospitalId(selectedMarker.id);
}
}
}
}
function getHospitalId(FeatureId) {
var dataOut = "{SessionId:'" + $('.logo').attr('data-SessionId') + "',FeatureId:'" + FeatureId + "'}";
$.ajax({
type: "POST",
url: "MainPage.aspx/getHospitalId",
data: dataOut,
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (hospitalid) { mapCompetitorView(hospitalid.d); },
error: function () { alert('Could Not Retrieve Facility Id!'); }
});
}
function OnMapCreated(map) {
olMap = map;
var HospitalsOverlay = olMap.getLayer("HospitalsOverlay");
var ASCOverlay = olMap.getLayer("ASCOverlay");
var ClientOverlay = olMap.getLayer("ClientOverlay");
HospitalsOverlay.events.register('click', HospitalsOverlay, markerClick);
ASCOverlay.events.register('click', ASCOverlay, markerClick);
ClientOverlay.events.register('click', ClientOverlay, markerClick);
}