So I here the vector layers now support images. I know this is a different
way of doing it but why wont my image show?
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 image does not show? Do I
need to use full paths now?
--
View this message in context:
http://osgeo-org.1803224.n2.nabble.com/vector-layer-wont-show-my-images-tp5880757p5880757.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