Perhaps you could share parts of your code and the error you are getting?<br>I think that will be more efficient then you having to recode another example :)<br><br>Casper<br><br><div class="gmail_quote">On Thu, Dec 8, 2011 at 2:59 PM, Takako Tucker <span dir="ltr"><<a href="mailto:Takako.Tucker@bbc.co.uk">Takako.Tucker@bbc.co.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><u></u>
<div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2"><span>Hi Casper</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2"><span></span></font> </div>
<div dir="ltr" align="left" lang="en-us"><span><font color="#0000ff" face="Arial" size="2">Do you think you
could put up an example page somewhere for moving pinpoints?
</font></span></div>
<div dir="ltr" align="left" lang="en-us"><span><font color="#0000ff" face="Arial" size="2">I've put the code
in, but throws an error which I'm struggling to get rid of! </font></span></div>
<div dir="ltr" align="left" lang="en-us"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div dir="ltr" align="left" lang="en-us"><span><font color="#0000ff" face="Arial" size="2">I've been having
a look at this one too <a href="http://openlayers.org/dev/tests/manual/tween.html" target="_blank"><font face="Times New Roman" size="3">http://openlayers.org/dev/tests/manual/tween.html</font></a><br>but not
luck converting this into my code. </font></span></div>
<div dir="ltr" align="left" lang="en-us"><span></span> </div>
<div dir="ltr" align="left" lang="en-us"><span><font color="#0000ff" face="Arial" size="2">Takako</font></span></div>
<div dir="ltr" align="left" lang="en-us"><span> </span></div>
<div dir="ltr" align="left" lang="en-us">
<hr>
</div>
<div dir="ltr" align="left" lang="en-us"><font face="Tahoma" size="2"><div class="im"><b>From:</b> Casper Span [mailto:<a href="mailto:info@spatially-oriented.com" target="_blank">info@spatially-oriented.com</a>]
<br></div><b>Sent:</b> 07 December 2011 20:56<div><div class="h5"><br><b>To:</b> Takako
Tucker<br><b>Cc:</b> Adam Eskreis;
<a href="mailto:openlayers-users@lists.osgeo.org" target="_blank">openlayers-users@lists.osgeo.org</a><br><b>Subject:</b> Re: [OpenLayers-Users]
Tweening pinpoints<br></div></div></font><br></div><div><div class="h5">
<div></div>Hi Takako,<br><br>In my example I wanted the map to move.<br>However,
it should be fairly easy to adapt the code to your liking.<br><br>Basically what
I do is letting the tween class calculate my path & timing, and on eachStep
I move the map. On eachStep, you should move your pinpoint with something like
this: (NOTE: not tested)<br><br><br>someFunc: function() {<br><br>// var
fromCoord = your starting point<br>// var toCoord = your destination point<br>//
var duration = number of steps it should take, the more you take, the smoother
the ride & longer it will take. (unless you also change the INTERVAL
constant on Tween)<br>var callbacks = {<br> eachStep:
tweenstep<br>};<br>var tween = new
OpenLayers.Tween(OpenLayers.Easing.Quad.easeInOut);<br>tween.start(fromCoord,
toCoord, duration, {callbacks: callbacks}<br><br>},<br><br>tweenstep: function
(value) {<br> // TODO: move your feature to the new coord<br> //
given in value.x and value.y<br>},<br><br><br>And another note: the tweenstep
function is being called from the tween class, so you are out of scope and
cannot see your feature. That's why, in my blogpost, I also stored the map
object into the tween. You will probably have to do something similar with your
feature.<br><br>If you can't get this to work, I might be able to set up a
sample somewhere. Also, you might have some luck looking at the developer
example code:<br><a href="http://openlayers.org/dev/tests/manual/tween.html" target="_blank">http://openlayers.org/dev/tests/manual/tween.html</a><br><br>regards,<br>Casper<br><br>
<div class="gmail_quote">On Wed, Dec 7, 2011 at 6:39 PM, Takako Tucker <span dir="ltr"><<a href="mailto:Takako.Tucker@bbc.co.uk" target="_blank">Takako.Tucker@bbc.co.uk</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT:1ex;MARGIN:0px 0px 0px 0.8ex;BORDER-LEFT:#ccc 1px solid"><u></u>
<div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Hi, so
this is what I currently got. </font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"><a href="http://paste.org/41978" target="_blank">http://paste.org/41978</a></font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">I can't
seem to see Tweening working between pinpoints... Any advise would be much
appreciated. </font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">The map
shouldn't move and just pinpoints should move...</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Takako</font></span></div><br>
<div dir="ltr" align="left" lang="en-us">
<hr>
<font face="Tahoma" size="2">
<div><b>From:</b> Casper Span [mailto:<a href="mailto:info@spatially-oriented.com" target="_blank">info@spatially-oriented.com</a>] <br><b>Sent:</b> 07 December
2011 10:38<br><b>To:</b> Takako Tucker<br></div><b>Cc:</b> Adam Eskreis; <a href="mailto:openlayers-users@lists.osgeo.org" target="_blank">openlayers-users@lists.osgeo.org</a>
<div>
<div><br><b>Subject:</b> Re: [OpenLayers-Users] Tweening
pinpoints<br></div></div></font><br></div>
<div>
<div>
<div></div>I dabbled a bit with this a few weeks ago and posted a small blog
on it... Maybe it helps.<br><a href="http://www.spatially-oriented.com/joomla/tech/34-gis-articles/59-animated-zoom-with-openlayers" target="_blank">http://www.spatially-oriented.com/joomla/tech/34-gis-articles/59-animated-zoom-with-openlayers</a><br>
<br><br>
<div class="gmail_quote">On Wed, Dec 7, 2011 at 10:55 AM, Takako Tucker <span dir="ltr"><<a href="mailto:Takako.Tucker@bbc.co.uk" target="_blank">Takako.Tucker@bbc.co.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT:1ex;MARGIN:0px 0px 0px 0.8ex;BORDER-LEFT:#ccc 1px solid"><u></u>
<div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Thanks
for this! I had a look at .Tween, but as it reacts to DOM elements I
couldn't be sure if it works with Lon Lat (X.Y) figure. </font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">I'll try
again later on though. </font></span></div><br>
<div dir="ltr" align="left" lang="en-us">
<hr>
<font face="Tahoma" size="2"><b>From:</b> Adam Eskreis [mailto:<a href="mailto:aeskreis@gmail.com" target="_blank">aeskreis@gmail.com</a>]
<br><b>Sent:</b> 06 December 2011 18:03<br><b>To:</b> Takako
Tucker<br><b>Cc:</b> <a href="mailto:openlayers-users@lists.osgeo.org" target="_blank">openlayers-users@lists.osgeo.org</a><br><b>Subject:</b> Re:
[OpenLayers-Users] Tweening pinpoints<br></font><br></div>
<div>
<div>
<div></div>There is an OpenLayers.Tween class I believe.<br><br>Also, this
is something that could easily be done iwth just regular javascript.
Don't forget, OpenLayers is comprised of DOM elements, so you can manipulate
the map with regular javascript, you don't have to use an OpenLayers
construct.<br><br>
<div class="gmail_quote">On Tue, Dec 6, 2011 at 12:33 PM, Takako Tucker <span dir="ltr"><<a href="mailto:Takako.Tucker@bbc.co.uk" target="_blank">Takako.Tucker@bbc.co.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT:1ex;MARGIN:0px 0px 0px 0.8ex;BORDER-LEFT:#ccc 1px solid"><u></u>
<div>
<p><font face="Arial" size="2">Hello, </font></p>
<p><font face="Arial" size="2">I'm currently using
OpenLayers.Control.DragFeature to move pinpoint from one place to another.
</font></p>
<p><font face="Arial" size="2"> var
dragFeature = new OpenLayers.Control.DragFeature(location);</font>
<br><font face="Arial" size="2">
map.addControl(dragFeature);</font> <br><font face="Arial" size="2">
dragFeature.activate();</font> </p><br>
<p><font face="Arial" size="2">But not only moving pinpoints, I need to add
tween animation. </font></p>
<p><font face="Arial" size="2">Has anyone done tween animation for moving
pinpoints? </font></p>
<p><font face="Arial" size="2">Any advise would be much appreciated!
</font></p>
<p><font face="Arial" size="2">Thanks </font></p>
<p><font face="Arial" size="2">Takako</font> </p>
<div> </div><br><font face="Times New Roman" size="3"><a href="http://www.bbc.co.uk" target="_blank">http://www.bbc.co.uk</a><br>This
e-mail (and any attachments) is confidential and may contain personal
views which are not the views of the BBC unless specifically stated.<br>If
you have received it in error, please delete it from your system.<br>Do
not use, copy or disclose the information in any way nor act in reliance
on it and notify the sender immediately.<br>Please note that the BBC
monitors e-mails sent or received.<br>Further communication will signify
your consent to this.</font>
</div><br>_______________________________________________<br>Users mailing
list<br><a href="mailto:Users@lists.osgeo.org" target="_blank">Users@lists.osgeo.org</a><br><a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br>
<br></blockquote></div><br>
<div> </div><br><font face="Times New Roman" size="3"><a href="http://www.bbc.co.uk" target="_blank">http://www.bbc.co.uk</a><br>This
e-mail (and any attachments) is confidential and may contain personal views
which are not the views of the BBC unless specifically stated.<br>If you
have received it in error, please delete it from your system.<br>Do not use,
copy or disclose the information in any way nor act in reliance on it and
notify the sender immediately.<br>Please note that the BBC monitors e-mails
sent or received.<br>Further communication will signify your consent to
this.</font>
</div></div></div><br>_______________________________________________<br>Users
mailing list<br><a href="mailto:Users@lists.osgeo.org" target="_blank">Users@lists.osgeo.org</a><br><a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br>
<br></blockquote></div><br>
<div> </div><br><font face="Times New Roman" size="3"><a href="http://www.bbc.co.uk" target="_blank">http://www.bbc.co.uk</a><br>This
e-mail (and any attachments) is confidential and may contain personal views
which are not the views of the BBC unless specifically stated.<br>If you have
received it in error, please delete it from your system.<br>Do not use, copy
or disclose the information in any way nor act in reliance on it and notify
the sender immediately.<br>Please note that the BBC monitors e-mails sent or
received.<br>Further communication will signify your consent to this.</font>
<div> </div><br><font face="Times New Roman" size="3"><a href="http://www.bbc.co.uk" target="_blank">http://www.bbc.co.uk</a><br>This
e-mail (and any attachments) is confidential and may contain personal views
which are not the views of the BBC unless specifically stated.<br>If you have
received it in error, please delete it from your system.<br>Do not use, copy
or disclose the information in any way nor act in reliance on it and notify
the sender immediately.<br>Please note that the BBC monitors e-mails sent or
received.<br>Further communication will signify your consent to this.</font>
</div></div></div></blockquote></div><br><div> </div><br><font face="Times New Roman" size="3"><a href="http://www.bbc.co.uk" target="_blank">http://www.bbc.co.uk</a><br>This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.<br>
If you have received it in error, please delete it from your system.<br>Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.<br>Please note that the BBC monitors e-mails sent or received.<br>
Further communication will signify your consent to this.</font>
</div></div></div>
</blockquote></div><br>