RE: Database and SVG file
"David Dailey" <[email protected]> Thu, 14 Nov 2013 08:31:56 -0500
| Newsgroups | gmane.text.xml.svg.devel |
|---|---|
| Message-ID | <000f01cee13d$e3bfde20$ab3f9a60$@net> |
Hi Aubrey, There are lots of different ways to proceed. Some involve more or less learning of SVG, and some rely more on JavaScript libraries like JQuery or D3.js. A lot depends on what sort of server-side environment you use. Some folks use PHP with MySQL; node.js is gaining traction; Ruby and Python are there as well as many other approaches. Or, depending on the nature of the data, one can use minimal server-side stuff (to merely except parts of a large file and send them, on request, to a client-side program that updates the SVG based on the data. D3 is quite nice and there are books available now to learn about it. The SVG Primer at http://www.w3.org/Graphics/SVG/IG/resources/svgprimer.html is a bit crusty around the edges, and though it doesn't discuss new developments with the integration of SVG with HTML5 or CSS3, it still provides a place to start learning about SVG and its scripting. This little thing http://granite.sru.edu/~ddailey/usmap.svg was cobbled together in about a day and shows how client side JavaScript can be used to request new subsets of census data stored on the server (using a tiny PHP script there) to recolor a map based on those data. The site http://carto.net/ provides lots of useful information about using SVG in mapping projects. Hope this helps David From: [email protected] [mailto:[email protected]] On Behalf Of flyfishac Sent: Wednesday, November 13, 2013 9:28 AM To: [email protected] Subject: [svg-developers] Database and SVG file I'm wondering if anyone can make suggestions on learning how to manipulate an SVG file with a database or if anyone has a simple example with source files. Reasons: I'm a salesman whose territory consists of 3 states. Within those states are counties. As sales begin to increase per county, the Fill Color of that county is edited by me via Inkscape. It would be nice to drive those colors via database and not have to alter the SVG file every time I make a large sale. *This can be a very powerful tool for organizations who want to better understand their territories in real time and visualize growth patterns over a period of time. I really want to learn how to do this! -Aubrey [Non-text portions of this message have been removed]