Add API method for changing an icon's marker image.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@4784 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2007-10-03 16:17:55 +00:00
parent 3d71b4ff4e
commit d29782e3e2
3 changed files with 50 additions and 0 deletions

View File

@@ -106,6 +106,18 @@ OpenLayers.Icon = OpenLayers.Class({
}
this.draw();
},
/**
* Method: setUrl
*
* url - {String}
*/
setUrl: function(url) {
if (url != null) {
this.url = url;
}
this.draw();
},
/**
* Method: draw