Hi, I have a viewBox example at www.resource-solutions.de/svg/viewbox or www.resource-solutions.de/svg/viewbox_map. Hope this helps. Mit freundlichen Grüßen/Regards Chris Peto Freelance System Development, Resource Solutions Founding Partner, Vectoreal --------------------------------------- Frankfurt, Germany Mobile: +49 (0) 173 308 7843 Tel:+49(0) 6103 80 21 98 Web: http://www.resource-solutions.de <http://www.resource-solutions.de/> http://www.vectoreal.com <http://www.vectoreal.com/> SVG editor: http://www.resource-solutions.de/svgeditor.html mailto:[EMAIL PROTECTED] ------------------------------------ Member of: SPARK - SVG Programmers' Application Resource Kit SVG site: http://www.schemasoft.org/svg/main.svg HTML site: http://www.schemasoft.org/ Widgets Example: http://www.resource-solutions.de/cgui_widgets/sliderzoom.svg
-----Original Message----- From: Aashish Singhvi [mailto:[EMAIL PROTECTED] Sent: Donnerstag, 3. Februar 2005 00:58 To: svg-developers@yahoogroups.com Subject: [svg-developers] Re: Some Problem making the application with SVG --- In svg-developers@yahoogroups.com, "comwang77" <[EMAIL PROTECTED]> wrote: > ... > > My problem is when user move to another position, I want to show the some part of map in the center of the user. In other words, > the size of map is 1600*1200 > user position is "400,400" >in this case, I wanna show the region of map as" 200,200" - "600,600" If user moves to another point, map should be generated automatically I can show the point of user to svg, but I dont know how to repaint the svg map. > Have you tried playing with evt.clientX, Y and the viewBox attribute on your SVG map. You can add an event handler on your top svg element (onmouseover="chg_view(evt)") and then in the javascript function, you can update the viewBox attribute of that svgelement. Something like: <svg id="MAINSVG" ....... onmouseover="chg_view(evt)"> ... <SCRIPT> mainsvgele = document.getElementById("MAINSVG"); viewX = 1200; viewY = 1200; mainsvgele.setAttribute('viewBox', '0 0 ' + viewX + ' ' + viewY); consx = viewX/2; consy = viewY/2; function chg_view(e) { clx = evt.clientX(); cly = evt.clientY(); newvb = (clx - consx) + ' ' + (cly - consy) + ' ' + consx + ' ' + consy; svgele.setAttribute('viewBox', newvb); return; } .. </SCRIPT> ... </svg> HTH, Aashish ----- 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] <mailto:[EMAIL PROTECTED]> * Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service <http://docs.yahoo.com/info/terms/> . [Non-text portions of this message have been removed] ----- 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/