View Full Version : servlets or javascript with SVG

06-05-2004, 12:58 PM
in an application i am developing, the user selects an input map
(in SVG format)[eg; map of India], a couple of data files
corresponding to the map he has chosen[area.txt and population.txt],
and some calculation he wants to be done [finding density]
the user make all these selections using a HTML form and
submits it to a server. on the server side, servlets extract the data
values from the input data[extract the area and population values of
each state from the text files], perform the necessary calculations
[calculates density by dividing each area value with the population
value] and obtains a result[ie density for each state].
now based on the result obtained, i want for a particular range of
output data [density], a color to be appplied on the map; for another
range, another color etc.
my questions are:
(1) can i use servlets to do the above coloring or
(2) should a javascript function be used to do the above color mapping
(3) if javascript is to be used, where should this javascript function
be in order to do the necessary calculation?
desperately waiting to hear from you.
thanks in advance.