And draw a line in a way like:<div>var feature = new OpenLayers.Feature(layer, points);</div><div>feature.createLine();</div><div><br></div><div>Similar at the createMarker?</div><div><br></div><div>Thanks!<br><br><div class="gmail_quote">
2010/1/25 Christopher Schmidt <span dir="ltr"><<a href="mailto:crschmidt@metacarta.com">crschmidt@metacarta.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Mon, Jan 25, 2010 at 05:02:07PM +0100, JuKiM wrote:<br>
> Hi,<br>
><br>
> I have a google maps, and I add a line to the map, but when I drag the map,<br>
> the line changes its position..<br>
<br>
</div><a href="http://faq.openlayers.org/vector-related-questions/why-dont-my-vector-features-work-over-google-yahoo-virtual-earth-etc/" target="_blank">http://faq.openlayers.org/vector-related-questions/why-dont-my-vector-features-work-over-google-yahoo-virtual-earth-etc/</a><br>
<div><div></div><div class="h5"><br>
> I draw with this:<br>
><br>
> var p1 = new OpenLayers.Geometry.Point(0.1, 40);<br>
> var p2 = new OpenLayers.Geometry.Point(0.2, 40);<br>
> var p3 = new OpenLayers.Geometry.Point(0.3, 40);<br>
> var p4 = new OpenLayers.Geometry.Point(0.4, 40);<br>
> var p5 = new OpenLayers.Geometry.Point(0.5, 40);<br>
> var p6 = new OpenLayers.Geometry.Point(0.6, 40);<br>
> var p7 = new OpenLayers.Geometry.Point(0.7, 40);<br>
> var p8 = new OpenLayers.Geometry.Point(0.8, 40);<br>
> var p9 = new OpenLayers.Geometry.Point(0.9, 40);<br>
> var p10 = new OpenLayers.Geometry.Point(0, 41);<br>
><br>
> var points = [];<br>
> points.push(p1);<br>
> points.push(p2);<br>
> points.push(p3);<br>
> points.push(p4);<br>
> points.push(p5);<br>
> points.push(p6);<br>
> points.push(p7);<br>
> points.push(p8);<br>
> points.push(p9);<br>
> points.push(p10);<br>
><br>
> // create a line feature from a list of points<br>
> var lineString = new OpenLayers.Geometry.LineString(points);<br>
> var lineFeature = new OpenLayers.Feature.Vector(lineString,<br>
> null, style_green);<br>
><br>
> I see the line like an "arrow head", but when I drag the map, the vertex<br>
> points another place... Where is the problem??<br>
><br>
> Thanks!<br>
<br>
</div></div>> _______________________________________________<br>
> Users mailing list<br>
> <a href="mailto:Users@openlayers.org">Users@openlayers.org</a><br>
> <a href="http://openlayers.org/mailman/listinfo/users" target="_blank">http://openlayers.org/mailman/listinfo/users</a><br>
<font color="#888888"><br>
<br>
--<br>
Christopher Schmidt<br>
MetaCarta<br>
</font></blockquote></div><br></div>