Hello,
We are currently using Map Suite MVC 8 in our project. I am in the process of upgrading to Map Suite MVC 9 (specifically build 9.0.0.129) and I have encountered an issue with draggable Markers in a SimpleMarkerOverlay. Whenever the marker is dragged the following OpenLayers code is throwing an exception when calling the function assigned to the Marker object’s display property due to the icon property being null. This did not occur prior to the upgrade to Map Suite MVC 9.
OpenLayers.Marker = OpenLayers.Class({
icon: null,
lonlat: null,
events: null,
map: null,
initialize: function(a, b) {
this.lonlat = a;
var c = b ? b : OpenLayers.Marker.defaultIcon();
null == this.icon ? this.icon = c : (this.icon.url = c.url, this.icon.size = c.size, this.icon.offset = c.offset, this.icon.calculateOffset = c.calculateOffset);
this.events = new OpenLayers.Events(this, this.icon.imageDiv)
},
destroy: function() {
this.erase();
this.map = null;
this.events.destroy();
this.events = null;
null != this.icon && (this.icon.destroy(), this.icon = null)
},
draw: function(a) {
return this.icon.draw(a)
},
erase: function() {
null != this.icon && this.icon.erase()
},
moveTo: function(a) {
null != a && null != this.icon && this.icon.moveTo(a);
this.lonlat = this.map.getLonLatFromLayerPx(a)
},
isDrawn: function() {
return this.icon && this.icon.isDrawn()
},
onScreen: function() {
var a = !1;
this.map && (a = this.map.getExtent().containsLonLat(this.lonlat));
return a
},
inflate: function(a) {
this.icon && this.icon.setSize({
w: this.icon.size.w * a,
h: this.icon.size.h * a
})
},
setOpacity: function(a) {
this.icon.setOpacity(a)
},
setUrl: function(a) {
this.icon.setUrl(a)
},
display: function(a) {
this.icon.display(a)
},
CLASS_NAME: "OpenLayers.Marker"
});