<font color="#000000"><font size="2"><font face="trebuchet ms,sans-serif">here you can see what i've done<br><br><a href="http://img215.imageshack.us/img215/5382/schermatazy.png">http://img215.imageshack.us/img215/5382/schermatazy.png</a><br>
<br>the markers are vector </font></font></font><font color="#000000"><font size="2"><font face="trebuchet ms,sans-serif">graphics</font></font></font><font color="#000000"><font size="2"><font face="trebuchet ms,sans-serif"> put into the Renderer object as i've explained in the previous email<br>
<br>pointRadius is used to zoom the marker<br>while the info popup is centered into it<br><br>just a bit coding is needed but OpenLayers seems to be very solid!<br><br></font></font></font><div dir="ltr" style=""><div id="tts_button" title="Ascolta la traduzione" style="display: block;" class=" ">
<object type="application/x-shockwave-flash" data="http://www.gstatic.com/translate/sound_player.swf" id="tts_flash" height="18" width="18"><param value="http://www.gstatic.com/translate/sound_player.swf" name="movie"><param value="sound_name=translate_tts%3Fq%3DOGNI%2Bparere%2Be%2Bgradito%26tl%3Dit&sound_name_cb=_TTSSoundFile" name="flashvars"><param value="transparent" name="wmode"><param value="always" name="allowScriptAccess"></object></div>
every opinion or suggestion is welcome!<br><br>-Vito-<span id="result_box" class="short_text"><span style="background-color: rgb(230, 236, 249); color: rgb(0, 0, 0);" title=""><br></span></span></div><br><font color="#000000"><font size="2"><font face="trebuchet ms,sans-serif"><br clear="all">
</font></font></font>--<br>-----------<br>Tafuni Vito<br><a href="mailto:vito@vitotafuni.com">vito@vitotafuni.com</a><br>---------------------------------------------<br>"Verba volant, scripta manent... data corrupted"<br>
<br><br><div class="gmail_quote">2010/6/16 Vito Tafuni <span dir="ltr"><<a href="mailto:vitotafuni@gmail.com">vitotafuni@gmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
hi Carlo<br><br>i'm working on vector layer because it seems to be the right solution.<br>at the moment i'm drawing a custom (vector) marker and the next step will be to find a way to animate it (and to show the popup window inside it).<br>
<br>this is the initial code i've wrote to draw a shape on a map<br> var point = e.xy;<br> <br> var markerTemplate = [<br> point,<br> point.offset(new OpenLayers.Pixel(100,0)),<br>
point.offset(new OpenLayers.Pixel(100,100)),<br> point<br> ];<br><br> for(i=0; i<markerTemplate.length; i++){<br> markerTemplate[i] = map.getLonLatFromViewPortPx(markerTemplate[i]);<br>
markerTemplate[i] = new OpenLayers.Geometry.Point(markerTemplate[i].lon,markerTemplate[i].lat);<br> }<br> <br> var style_mark = OpenLayers.Util.extend({}, OpenLayers.Feature.Vector.style['default']);<br>
style_mark.graphicWidth = 24;<br> style_mark.graphicHeight = 20;<br> style_mark.graphicXOffset = 10; // default is -(style_mark.graphicWidth/2);<br> style_mark.graphicYOffset = -style_mark.graphicHeight;<br>
// graphicTitle only works in Firefox and Internet Explorer<br> style_mark.graphicTitle = "this is a test tooltip";<br><br><br> var feature = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Polygon(new OpenLayers.Geometry.LinearRing(markerTemplate)),null,style_mark);<br>
<br>but i've changed it with this<br> OpenLayers.Renderer.symbol.marker = [0,0, 0,-100, 100,-100, 0,0];<br> var style_mark = OpenLayers.Util.extend({}, OpenLayers.Feature.Vector.style['default']);<br>
style_mark.graphicName='marker';<br> style_mark.pointRadius=10;<br> <br> var point = map.getLonLatFromViewPortPx(e.xy);<br> var feature = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(point.lon,point.lat),null,style_mark);<br>
<br>because i wanted a fixed size marker respect to the zoom level of the map<br><br><br>if someone know how to animate the mark (i've seen a Tween class but i had no time to experiment!) please write down a link or a sample code!!<div class="im">
<br>
<br>Vito<br><br><br><br>--<br>-----------<br>Tafuni Vito<br><a href="mailto:vito@vitotafuni.com" target="_blank">vito@vitotafuni.com</a><br>---------------------------------------------<br>"Verba volant, scripta manent... data corrupted"<br>
<br><br></div>2010/6/15 Carlo Sassani <<a href="mailto:carlo@sarmoung.it" target="_blank">carlo@sarmoung.it</a>><div><div></div><div class="h5"><br><br> Vito Tafuni <vitotafuni@...> writes:<br><br> > hi to all I would like to make a marker like the "image markers" on<br>
london2012<a href="http://www.london2012.com/map.php" target="_blank">http://www.london2012.com/map.php</a><br> > click on "Olimpic Park"so i would like to have a "zooming" animation on a<br>
marker instead of the info bubble popup<br>
> do you suggest me to work on markers layout (extending the Marker class) or<br> > with the vector layout (and vector shapes)??thanks Vito<br> > _______________________________________________<br> > Users mailing list<br>
> Users@...<br> > <a href="http://openlayers.org/mailman/listinfo/users" target="_blank">http://openlayers.org/mailman/listinfo/users</a><br><br><br> I've a similar problem!<br> Did you find any solution?<br>
<br><br>
<br><br> _______________________________________________<br> Users mailing list<br> <a href="mailto:Users@openlayers.org" target="_blank">Users@openlayers.org</a><br> <a href="http://openlayers.org/mailman/listinfo/users" target="_blank">http://openlayers.org/mailman/listinfo/users</a><br>
</div></div></blockquote></div><br>