SVG + DB
Submitted by 18MARIE on Sun, 2006-05-28 19:40
Hello,
I'd like to put up(poster) the architecture of a water_network and the information
necessary is in data base ,SO I'd like to know how I can do that with SGV?
i.E how I can create a map on a web site ,getting information from DB,
I d like to have some references for SVG, bc i'don't know it and the relation
between it and the BD,
I 've forgot to tell you that I'm doing the web site in PHP.
Thanks
Comments
If you're getting the map
If you're getting the map data from the database then turning in to SVG, then there isn't really a direct relationship between the database and the SVG.
First make sure that you know how to get the data from your database into your PHP code. After that you can use PHP methods to write out that information as SVG.
If you give a little more information about your application, someone mught be able to give you a more specific answer.
hth
Agree with there isn't
Agree with there isn't really a direct relationship between the database and the SVG. but there need more references for SVG online, like examples with PHP. I think I need this too.
-----
software reviews
An open standard for
An open standard for vector-based graphics offers a new way to put images on Web pages. The Scalable Vector Graphics standard has been in progress at the W3C for more than two years. Like many developing technologies, it was not immediately useful. Slowly, applications began supporting SVG. Things became really interesting in June 2000, when Adobe released plugins for both Microsoft Internet Explorer and Netscape Navigator.
SVG is more than just another way to put graphics on a Web page, but as I spend a lot of time building Web applications, this aspect is what caught my attention. PHP has allowed direct manipulation of graphics since an interface to the GD library was added several years ago. There are ways to generate GIF, JPEG, PNG, PDF and even Flash. But SVG is different in one important way: it's an XML language. All those other graphics formats use a binary format. Opening an SVG image in a text editor reveals friendly, familiar XML.
And what better programming language than PHP for generating dynamic SVG images? After all, PHP has proven itself perfectly suited to generating markup languages. I read through the SVG specification and converted the pie chart example from Core PHP Programming from JPEG to SVG.
Set up your client
You'll need to install the Adobe SVG plugin, or find some other way to view SVG images. The W3 maintains a list of SVG Implementations. The Adobe plugin works on IE and Navigator for both Windows and Macintosh. Unfortunately, support for other operating systems is sketchy at best. Mozilla has limited support for SVG. There are two competing Java toolkits: CSIRO SVG Toolkit and the Apache Group's Batik SVG toolkit.
A release candidate of version 2.0 of Adobe's plugin was released in March 2001. If you use IE or Navigator, download the installer. You simply double-click on the installer. The plugin is free for personal use, but the source code is not available.
SVG is XML
Like any XML language, SVG conforms to a certain structure defined by XML and the SVG DTD. If you're not experienced with writing XML documents, the most important idea to realize is that you can't get away with breaking the rules as you can with HTML. The W3 page on XML has many links to documents to help you learn XML, if needed. I'm assuming you're comfortable with XML.
The latest version of the candidate recommendation is an adequate reference to the SVG tags. I haven't experimented with gradients or filters. There's much more to SVG than I will discuss here.
SVG documents are using image/svg-xml for MIME type, although this isn't approved yet. It's recommended that SVG documents use an .svg extension, but if we send a proper Content-type header, this shouldn't matter. Our files will have a .php extension, of course, but we'll use header() to send the MIME type.
Generating SVG
In Chapter 19 of Core PHP Programming, I explained how to create a pie chart using the image functions. The example code generated a JPEG based on an array of values. The values are based on an imaginary survey of people's favorite meats. For example, 99 people said they liked beef best. A pie chart showed this value as a portion of the pie. Converting this script into an SVG generator seemed like a good way to take SVG for a spin.
The pie chart is a set of wedges: two straight sides and an arc. In order to draw the wedges using the image functions, I had to draw two lines radiating from the center of the chart. I then connected them with an arc, and filled the interior. The GD library has a special function for drawing filled polygons, but they are defined by an array of points. There's no practical way to draw a polygon with a curved side.
SVG does support polygons with curved sides. In fact, it supports cubic Bezier curves, quadratic Bezier curves and elliptical arcs. The foundation of the filled polygon is the path tag. The d attribute of this tag contains a series of commands for a cursor. You can instruct it to move to a point, draw a straight line from the current position to another point, or draw a curve to another point. You can also end with a command to close the polygon by connecting the current position to the starting point.
Using SVG in the real world
SVG has many appealing qualities. The SVG file is only 1992 bytes, which is quite small. When I tried saving the same image a GIF, it was almost four times larger. PNG was worse. I could probably reduce the SVG file substantially by removing the comments, using classes instead of embedded styles, and then compressing it. The Adobe plugin knows how to deal with gzipped SVG images.
Another aspect of SVG images is one they share with Flash animations. Since they are vector-based, you can zoom in and zoom out with no loss of quality. That's why it has "scalable" in its name.
Text that's part of an SVG image is available for copying into your clipboard. That's something unexpected for a graphic format.
Despite these outstanding features, the biggest problem with SVG is the lack of support. The Adobe plugin allows the majority of Web surfers to view SVG images, but at the cost of downloading a big installation file. Until SVG support comes as part of the standard browser installation, SVG images can't be used on most Web pages. However, in the context of an intranet, you can ask someone to download the plugin before viewing a special chart.
________________
Submited by : Recetas
http://www.getsvg.com/node/44
http://www.getsvg.com/node/44#comment-7362
Tiffany jewelry has been an
Tiffany jewelry has been an incontrovertible perfect gift idea. Here we have hundreds of cheap and discounted tiffany silver jewelry,including tiffany rings, tiffany bangles,tiffany bracelets, pendants,tiffany necklaces
(tiffany necklace), charms, tiffany earrings,
tiffany cuff links
(tiffany cufflinks),and
tiffany money clips,
tiffany key rings for your choice. All our jewelry is 925
tiffany sterling silver guaranteed.
Ok, this is totally random.
Ok, this is totally random. I'm going to post 10 random punchlines, I wonder if anyone out there can come up with a joke that'll actually make sense with one of them? Post your comments!
______________________________________
My X'mas gift idea:replica watches | porcelain dolls
buy viagra online is an oral
buy viagra online is an oral medicine used for treating male impotence (e.g., erectile dysfunction).
order viagra advantages are a great safety track record and proven side effects.
The effect of cheap generic viagra starts in 30 minutes to 1 hour and lasts for about 4 hours.
search job online
Job Hunt
Local Jobs For Women
Job Searching How
Best Windows VPS Hosting
Best Windows VPS Hosting by
best cheap vps | ucvhost | cheap hosting
Since, as an indispensable
Since, as an indispensable links of london ornament to dresses, play an important role in displaying one’s distinctive personalities if they are properly matched. It is easy for people to pay attention to new and fashionable Tiffany Jewellery; it is also easy for people links of london sale to ignore the face shape and hair style when choosing jewels. However, if your jewels don’t match with your face shape and hair style, they will not play the role as ornaments. Therefore, the importance of the match between jewels and hair style and face shape can’t be stressed too links of london jewellery much. Hope the following information may help you. Here are some tips for you to choose and match jewelries. Hope to have some assistance. The jewels you chose should be matched with your clothes, age, complexion, etc. so as to stand out you. The most important code: on one hand, your jewels can’t be the same links of london jewelry shape with your face; on the other hand, they can’t be extremely different from your face shape. The best jewel piece for a girl with a heart-shape face is the one that is wider at the bottom because once again links of london charms that will balance out that chin. Women will never be content with the jewelry in the casket, and they are always dreaming of a more brilliant one. Because of the reason that few people could withstand the glamour of these shining links of london jewels which are often engraved: links of london that is peculiar to links of london Company. Since jewels, as an indispensable ornament to dresses, play an important role in displaying one’s distinctive personalities if they are properly matched. But it is hard for people to master the tips in choosing jewelries properly. Some suggestions on choosing and matching jewelries are as follows. Hope to help you! Make links of london friendship bracelet sure the jewels are suitable for your dresses, age, career, complexion and other aspects in order to highlight your personalities. And something likes a teardrop Tiffany Jewellery, upside down triangle, or even a button look perfect. The match of short hair and Tiffany Jewellery ear stud london links will impress others as smart and capable. Jazzy clothes go well with Tiffany Jewellery having simple design. You will never be worry about that your causal dresses are too ordinary if you match them with a well-designed jewelry with some color. But for ladies who have fair skin can links of london bracelets wear red Tiffany Jewellery or other dark-colored ones to let the faces look brighter. Ladies who have plump figures could consider wearing the shining Tiffany Jewellery which will let them look noble and dignified. Links London Watches On the contrary, these jewels with dark color and traditional designs are fit for middle-aged and elderly people. It is hard for women to resist the temptation of jewelries and women’s jewelry box is like an abysm which is never full. When declaring that We links of london rings do not want any jewelries, We may throw many girls into great confusion. In respect that the personal taste and qualities will be revealed if the jewels are properly matched with the dresses. But it is hard for links of london necklace people to master the tips in choosing jewelries properly. The following are some tips which are in the hope of guiding and giving aid to the choosing and matching jewelries. Great attention should be paid to the coordination of the jewelries you chose to your face, complexion, temperament, hairstyle, etc. so that you can obtain the most suitable jewelries. The basic criteria is to links of london UK choose the jewelry whose shape is neither resemble your face shape nor totally opposite your face shape.Classic Smiley Minx Charm.
It is amazing to pair your
It is amazing to pair your Christian Louboutin Pumps for sale with a hot new handbag or messenger bag. Christian Louboutin Outlet Lower body of the brown checked skirt is dramatic focus. Scarves and skirts in bright colors of the same color, so that Cheap Christian Louboutin Shoes Sale we are more vivid and eye is also up for promotion.
Buy Christian Louboutin bay wins a great reputation among the public.Cheap Christian Louboutin Shoes Sale has wined a great reputation among the public. This brand Christian Louboutin classic collection has never left behind the fashion. I also love to wear Christian Louboutin shoes
Post new comment