well, try to add the max extend of the layer and map units (the next is for
meters)
var options1 = {units: 'm', projection: "EPSG:102003", maxExtent: new
OpenLayers.Bounds(xmin, ymin, xmax, ymax)};2009/9/18 karsten vennemann <[email protected]> > hmm I tried now > > var options1 = {projection: "EPSG:102003"}; > vectorlayer = new OpenLayers.Layer.Vector("Vector Layer",{layers: > 'basic'},options1); > map.addLayer(vectorlayer); > var thestreetgeom = new > OpenLayers.Geometry.fromWKT("LINESTRING((-1930473.64430529 1513488.44352758, > -1646969.91778704 1155135.05969326))", { style: "default" }); > vectorlayer.addFeatures(thestreetgeom); > > > but still nothing shows and no error... > > Karsten > > ------------------------------ > *From:* Michael Shishcu [mailto:[email protected]] > *Sent:* Thursday, September 17, 2009 23:55 > *To:* karsten vennemann > *Cc:* [email protected] > *Subject:* Re: [OpenLayers-Users] adding feature to vectorlayer from wkt > > Hi, Karsten > maybe your layer does not have the correct projection? > try > var options = {..., projection: "EPSG:102003", ... }; > vectorlayer = new OpenLayers.Layer.Vector("Vector Layer",{layers: > 'basic'},options ); > > regards, michael > > 2009/9/18 karsten vennemann <[email protected]> > >> I am trying to add line features to a vector feature layer in my map >> (projection is EPSG:102003, as are the coordinates of the wkt below) >> >> vectorlayer = new OpenLayers.Layer.Vector("Vector Layer"); >> map.addLayer(vectorlayer); >> var thestreetgeom = new >> OpenLayers.Geometry.fromWKT("LINESTRING((-1930473.64430529 1513488.44352758, >> -1646969.91778704 1155135.05969326))", { style: "default" }); >> vectorlayer.addFeatures(thestreetgeom); >> >> I do not get any error but nothing shows on my map. Could this still be a >> projection problem or am I missing something else ? >> >> Karsten >> Terra GIS LTD >> Seattle, USA >> www.terragis.net >> >> _______________________________________________ >> Users mailing list >> [email protected] >> http://openlayers.org/mailman/listinfo/users >> >> >
_______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
