Dear all:


I am student studying Computer Science at Tsinghua University in Beijing.
Currently, I am working on a GIS project based on
MapBuilder<http://docs.codehaus.org/display/MAP/Home>and
GeoServer <http://docs.codehaus.org/display/MAP/Home>.

Based on MapBuilder on the browser, I want to draw some svg shapes on the
map obtained from WMS. I found svg2vml
<http://code.google.com/p/svg2vml/>library very interesting, and was
trying to draw svg on the map.

                             <div id="svgPane" style="position:relative;">

                            <div id="mainMapPane"
style="position:relative;">

<!-- This is the container where the map will be drawn -->

                                      <noscript>

                                        this page requires Javascript to be
enabled

                                      </noscript>

                              </div><!-- /mainMapPane -->

                              </div>

             <script>

                    //go();

                    function go() {

                           var vectorModel = new VectorModel();

                           var container = document.getElementById
("svgPane");

                           var mySvg = vectorModel.createElement("svg");

                           container.appendChild(mySvg);

                           mySvg.setAttribute("version", "1.1");

                           var myG = vectorModel.createElement("g");

                           mySvg.appendChild(myG);

                           var myRect = vectorModel.createElement("rect");

                           myRect.setAttribute("x", 10);

                           myRect.setAttribute("y", 10);

                           myRect.setAttribute("width", "20px");

                           myRect.setAttribute("height", "20px");

                           myRect.setAttribute("stroke","#3399ff");

                           myRect.setAttribute("stroke-width", "4px");

                           myRect.setAttribute("fill", "#FFFFFF");

                           myG.appendChild(myRect);

                    }

             </script>

As shown in the code, the shapes are always away from the map. L



Could you help me out of this? How can I draw SVG pictures on a div tag
where map is extracted from WMS? Thank you very much.



Regards,

Chen CHEN

2007-5-30
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
mapbuilder-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mapbuilder-devel

Reply via email to