[OpenLayers-Users] Update Markers
Dara Dowd
dara.dowd at vertexsys.co.jp
Wed Aug 29 23:33:36 EDT 2007
Christopher Schmidt-4 wrote:
>
> On Wed, Aug 29, 2007 at 05:48:58PM -0700, Wagner, Jeffrey S. (Mission
> Systems) wrote:
>>
>> I'm utilizing ActiveMQ to push objects onto a map. As messages are
>> received a "database" on the client side is built to determine if this
>> is a new object, or just an update to an existing object. Currently,
>> I'm removing the existing marker and then adding a new marker for an
>> updated. This seems pretty in-efficient. Any ideas?
>
> There is no 'supported' way of doing this, but marker.icon.imageDiv is
> the actual container for the image. (This probably is a div, with an img
> as its firstChild.) Using this and just changing
> marker.icon.imageDiv.firstChild.src will probably work, but it is
> possible (though at this point, seems relatively unlikely) that the name
> 'imageDiv' will change in the future, so you should be prepared to check
> your code against a new release before switching over.
>
>
I found that
markers[this.currentlyHighlighted[i]].icon.imageDiv.firstChild.src =
this.default_marker_src
doesn't work for me in IE6
but
OpenLayers.Util.modifyAlphaImageDiv(markers[this.currentlyHighlighted[i]].icon.imageDiv,null,null,null,this.default_marker_src);
does.
--
View this message in context: http://www.nabble.com/Update-Markers-tf4351341.html#a12399341
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list