[OpenLayers-Dev] Noob Needs Marker/Icon Help

Eric Theise erictheise at gmail.com
Fri Dec 9 14:59:18 EST 2011

Hi Arnie,

On Fri, Dec 9, 2011 at 8:17 AM, Arnie Shore <ashore3 at verizon.net> wrote:
> I'll truly appreciate anyone's taking some time to look at
>   http://www.saefern.org/_osm/test.php
> and tell me what I'm doing wrong.  AS

I don't know why this should be, but if you break your addMarker
operations into two steps, it'll work.  By that I mean, turn

  markers.addMarker(new OpenLayers.Marker(my_lonlatproj ( -76.5, 39.0)),icon);
  markers.addMarker(new OpenLayers.Marker(my_lonlatproj ( -76.7,


  m = new OpenLayers.Marker(my_lonlatproj ( -76.5, 39.0), icon);
  n = new OpenLayers.Marker(my_lonlatproj ( -76.7, 39.0), icon.clone());

I've typically done this in a loop, using icon.clone() every time, and
it doesn't look quite so stupid in that context.

Hope that helps.


More information about the Dev mailing list