Hello, I have a big problem at draw a circle at map. It funcs but the point will draw a little bit out of clicked point. So some cirles is draw like a raster. I have check the results of x and y that are calculated. It looks like correct. But the cirlce is not set at the correct place, so I can´t draw righly.
Here some code : PHP draw a blank svg-layer: print('<svg id="PAINT" width="100%" height="100%" viewBox="'.$x.' '.$y.' '.$width.' '.$height.'" save="snapshot" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision;" >'); $color="lightblue"; print ('<rect id="PAINTr" stroke="rgb(0,0,0)" onmousemove="" onmouseout="" onclick="draw_poly(evt)" fill="'.$color.'" x="'.$x.'" y="'.$y.'" width="'.$width.'" height="'.-$height.'" opacity="'.$opo.'" />'); echo "</svg>"; Javascriptpart: function draw_poly(evt) { var svgRoot = svgDocument.documentElement; allWidth=window.innerWidth; allHeight=window.innerHeight; var xpos,ypos=0; var quadrat=evt.getTarget(); //var allHeight=quadrat.getAttribute("height"); //alert (allHeight); var paintsvg=svgdoc.getElementById("PAINT"); // Ausgleich der Seitenverhältnisse var ausglh=1; var ausglv=(allWidth/allHeight)/(paintsvg.getElementById("PAINTr").getAttribute( "width")/paintsvg.getElementById("PAINTr").getAttribute("height")); if (ausglv>1) { } var vp=paintsvg.getAttribute("viewBox").split(" ") var xm=evt.getClientX(); var ym=evt.getClientY(); scale = svgRoot.getCurrentScale(); trans = svgRoot.getCurrentTranslate(); var nx =(xm/scale + ((- trans.x ) / scale)); var ny =(ym/scale + ((- trans.y ) / scale)) ; alert(nx+","+ny+"scale"+scale+"transx"+trans.x+"transy"+trans.y+','+ausglv+' xm='+xm+'ym='+ym+'vp2'+vp[2]); nx=nx/(allWidth/parseFloat(vp[2]))/ausglh; nx+=parseFloat(vp[0]) ny=ny/(-allHeight/parseFloat(vp[3]))/ausglv; ny+=parseFloat(vp[1]) alert(nx+","+ny+"scale"+scale+"transx"+trans.x+"transy"+trans.y+','+ausglv+' xm='+xm+'ym='+ym); r=svgdoc.createElement("circle"); r.setAttribute("cx",nx); r.setAttribute("cy",ny); r.setAttribute("r",4); r.setAttribute("fill","red"); r=paintsvg.appendChild(r); } What ´swrong Could anyone hejp me? Burkhard Stollenwerk ----- Original Message ----- From: "Roger L. Cauvin" <[EMAIL PROTECTED]> To: <svg-developers@yahoogroups.com> Sent: Monday, January 10, 2005 7:35 PM Subject: [svg-developers] Re: real time data publishing using servlets > > > > Roger, I want SVG to animate as the sensor > > data changes - so at a freq greater than say > > 100Hz. > > In that case, you'll need to implement some sort of client/server > communication as another participant in this discussion recommended. Our > need was a bit simpler; we wanted our survey analysis tool to display charts > based on user-defined criteria. There was no need for SVG animation. > > -- > Roger L. Cauvin > [EMAIL PROTECTED] > Cauvin, Inc. > http://www.cauvin-inc.com > > > > ----- > To unsubscribe send a message to: [EMAIL PROTECTED] > -or- > visit http://groups.yahoo.com/group/svg-developers and click "edit my membership" > ---- > Yahoo! Groups Links > > > > > > > ----- To unsubscribe send a message to: [EMAIL PROTECTED] -or- visit http://groups.yahoo.com/group/svg-developers and click "edit my membership" ---- Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/svg-developers/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/