[mapserver-users] Image Maps
Antti.Roppola at brs.gov.au
Antti.Roppola at brs.gov.au
Thu Aug 1 20:00:23 PDT 2002
How about rendering a view of the Shapefile and using the RGB values
as a key to generate the Image map?
Use something like imlib inside PHP to create an interim image using
your region as a class-item... This would probably hit the filesystem
less than the approach you are currently using, plus the rendered image
would never have more cases to consider than the number of pixels in it.
Basically sample down the detailed data before you start processing.
Antti
-----Original Message-----
From: Manuel Marichal Pérez [mailto:marichalperez at yahoo.es]
Sent: Friday, 2 August 2002 12:01 AM
To: Lista (MapServer)
Subject: [mapserver-users] Image Maps
Hi, all. Image maps are a commonly question treated in Mapserver list.
The solution suggested by MapServer experts is to use Mapscript to read
the shapes and then build up a image map. If your application uses a
java viewer (such us ROSA or other) you can build the map using XML (for
example) and then read it from Java.
Ok. I wrote a PHP/Mapscript function that read the DBF file and extract
the polygons. Each polygon is assigned a label which is extracted from a
column of the DBF itself. With this, I make an XML file including the
map and ROSA read it to manage the "MouseOver" method. This idea works
fine:
http://www.buscamap.com/simpletest/index.html
The problem here is the layer which the image map is build for. If the
layer contains very much polygons, this method take a long time to build
the image map. My question is: it is possible to reduce this time?.
- MapServer is unable to make image maps itself (correct me if not, please)
- If I include a clipping method in the function, I will obtain smaller
XML files, but the time is not reduced because if I want to know which
polygons fall in the view and which fall out of it I still have to read
its coordinates to know it.
- I suppose indexes (shptree) don't help at all because the polygons are
read in order to be treated and then, index are unuseful here.
:(
What can I do if I need image maps in my application and the layer which I
need for contains several polygons?. Any ideas?.
Thanks in advance,
Manuel Marichal Pérez
marichalperez at yahoo.es
_______________________________________________________________
Yahoo! Messenger
Nueva versión: Webcam, voz, y mucho más ¡Gratis!
Descárgalo ya desde http://messenger.yahoo.es
More information about the MapServer-users
mailing list