Oh good, I hated tracking two layers.. so here is what I have.

Map.addMarker =   function (  pts,  iconSize, iconURL, desc/*not used*/ ,
layer) 
{       

        var markerStyle = OpenLayers.Util.extend({},
OpenLayers.Feature.Vector.style['default','select']);
                            markerStyle.graphicWidth = iconSize;
                            markerStyle.graphicHeight = iconSize;
                            markerStyle.graphicOpacity = 1;
                            markerStyle.externalGraphic =
'icons/marker.png';
                            markerStyle.graphicTitle = desc;                    
                                        
         var points = new Array(new OpenLayers.Geometry.Point(ProjLatLon( 
pts.lat,
pts.lon).lon, ProjLatLon( pts.lat, pts.lon).lat ))
     var obj = new OpenLayers.Geometry.LineString(points);
         var newFeature = new OpenLayers.Feature.Vector( obj , null, 
markerStyle );
            layer.addFeatures(newFeature)
                        //while (! checkLoaded(newFeature.id) ) {} //hold off 
till loaded.
                        //newFeature.layer.drawFeature(newFeature);//may help
                        return newFeature;
}

I tried to hard code the image see bold, but my icons do not show? Do I need
to use full paths now?
-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/marker-added-event-tp5874629p5877137.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to