<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content=text/html;charset=iso-8859-1>
<META content="MSHTML 6.00.6002.18309" name=GENERATOR></HEAD>
<BODY id=MailContainerBody
style="PADDING-RIGHT: 10px; PADDING-LEFT: 10px; PADDING-TOP: 15px" leftMargin=0
topMargin=0 CanvasTabStop="true" name="Compose message area">
<DIV><FONT face=Arial size=2>I was just writing this off the cuff & got some
of the CSS3 values wrong.</FONT></DIV>
<DIV><FONT face=Arial size=2>I have an example that uses CSS3 [1] and another
that uses img divs and works in IE6 [2]</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>[1] <A
title="http://kestrelcomputer.com/linetest.html CTRL + Click to follow link"
href="http://kestrelcomputer.com/linetest.html">http://kestrelcomputer.com/linetest.html</A></FONT></DIV>
<DIV><FONT face=Arial size=2>[2] <A
title="http://kestrelcomputer.com/linetest_ie.html CTRL + Click to follow link"
href="http://kestrelcomputer.com/linetest_ie.html">http://kestrelcomputer.com/linetest_ie.html</A></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Matt Priour<BR>Kestrel Computer
Consulting</FONT><BR></DIV>
<DIV style="FONT: 10pt Tahoma">
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A
title="mailto:mpriour@kestrelcomputer.com CTRL + Click to follow link"
href="mailto:mpriour@kestrelcomputer.com">Matt Priour</A> </DIV>
<DIV><B>Sent:</B> Tuesday, October 26, 2010 6:37 PM</DIV>
<DIV><B>To:</B> <A
title="mailto:oscarblo@gmail.com CTRL + Click to follow link"
href="mailto:oscarblo@gmail.com">̉scar Vidal Calbet</A> ; <A
title="mailto:users@geoext.org CTRL + Click to follow link"
href="mailto:users@geoext.org">users@geoext.org</A> </DIV>
<DIV><B>Subject:</B> Re: [Users] Dynamic line between point and
pop-up</DIV></DIV></DIV>
<DIV><BR></DIV>
<DIV><FONT face=Arial size=2>This an interesting problem, one which we have
explored somewhat but never implemented.</FONT></DIV>
<DIV><FONT face=Arial size=2>CSS3 supporting browsers give you some nice
possibities.</FONT></DIV>
<DIV><FONT face=Arial size=2>1. Anchor a div on one corner to the popup and on
the other corner, the vector feature. Use a CSS background property for the div
that includes an background image and background size with 'stretch stretch' or
the actual pixel height width values.</FONT></DIV>
<DIV><FONT face=Arial size=2>2. Use a narrow div of variable height that you
stretch and rotate to stay anchored to the popup</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>However, these are really just trying to mimic
something that is already easily accomplished in Canvas, SVG, or VML. You could
code the vector graphic yourself, OR just use the vector drawing API already
implemented in OpenLayers.</FONT></DIV>
<DIV><FONT face=Arial size=2>What I would do is to add a linear feature in the
vector layer you are already using.</FONT></DIV>
<DIV><FONT face=Arial size=2>You could create the vector feature and make it a
property of the popup in the popup's afterrender event handler and then
just reposition it in the move event handler.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>for example here is a totally untested afterrender
event handler, the move event handler could be somewhat similar:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>//assumes that you set a vector feature as the
location config option for the popup</FONT></DIV>
<DIV><FONT face=Arial size=2>onPopupRender(popup){</FONT></DIV>
<DIV><FONT face=Arial size=2> var lyr =
popup.location.layer;</FONT></DIV>
<DIV> var cmpBox = popup.getBox();</DIV>
<DIV> var brPopPixel = new
OpenLayers.Pixel(cmpBox.x+cmpBox.width,cmpBox.y+cmpBox.height);</DIV>
<DIV><FONT face=Arial size=2> var anchor = new
OpenLayers.Feature.Vector(new
OpenLayers.Geometry.LineString([lyr.getLonLatFromViewPortPx(brPopPixel),popup.location.geometry.getCentroid()]));</FONT></DIV>
<DIV> <FONT face=Arial
size=2>lyr.addFeatures([anchor]);</FONT></DIV>
<DIV> <FONT face=Arial size=2>popup.anchor =
anchor;</FONT></DIV>
<DIV><FONT face=Arial size=2>}</FONT></DIV>
<DIV style="FONT: 10pt Tahoma"><FONT face=Arial></FONT><FONT
face=Arial></FONT><FONT face=Arial></FONT><FONT face=Arial></FONT> </DIV>
<DIV style="FONT: 10pt Tahoma"><FONT face=Arial>Matt Priour</FONT></DIV>
<DIV style="FONT: 10pt Tahoma"><FONT face=Arial>Kestrel Computer
Consulting</FONT></DIV>
<DIV style="FONT: 10pt Tahoma"><FONT face=Arial></FONT> </DIV>
<DIV style="FONT: 10pt Tahoma">
<DIV><FONT face=Arial></FONT><FONT face=Arial></FONT><BR></DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A
title="mailto:oscarblo@gmail.com CTRL + Click to follow link"
href="mailto:oscarblo@gmail.com">̉scar Vidal Calbet</A> </DIV>
<DIV><B>Sent:</B> Tuesday, October 26, 2010 1:07 PM</DIV>
<DIV><B>To:</B> <A
title="mailto:users@geoext.org CTRL + Click to follow link"
href="mailto:users@geoext.org">users@geoext.org</A> </DIV>
<DIV><B>Subject:</B> [Users] Dynamic line between point and
pop-up</DIV></DIV></DIV>
<DIV><FONT face=Arial size=2></FONT><FONT face=Arial
size=2></FONT><BR></DIV>Hey everybody,
<DIV><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT><BR></DIV>
<DIV>I'm looking for some help<BR>
<DIV><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT><BR></DIV>
<DIV>I'm new working with GeoExt, and I have a need that
I don't know if GeoExt can resolve.</DIV>
<DIV><BR></DIV>
<DIV>I want show a map where you can
find different entities represented by points and lines. The user
have to be allowed to make identify for each entity and have open several pop-up
at the same time. The aims is that the user have to
be allowed to move all the pop-up of the screen in a free
way, but I don't want lost the
reference between the pop-up and the entity, so I need show a
dynamic line between the pop-up and the entity</DIV>
<DIV><BR></DIV>
<DIV>thanks in advance,</DIV>
<DIV>Oscar </DIV>
<DIV><BR></DIV>
<DIV>sorry for my poor english</DIV>
<DIV><BR></DIV>
<DIV><BR></DIV></DIV>
<P>
<HR>
<P></P>_______________________________________________<BR>Users mailing
list<BR>Users@geoext.org<BR>http://www.geoext.org/cgi-bin/mailman/listinfo/users<BR></BODY></HTML>