[Mapserver-users] jBox

Richard Greenwood rich at greenwoodmap.com
Wed Jan 21 12:02:00 PST 2004


Michael Smith wrote:

> Should this be something to the effect of "http://192.168.110.1/[img]"  I
> did not change the path in my source it still shows "http://[host],[img].  I
> am not sure which image I should be refering too here..help!

When you view the page source in your browser (right click on the page a 
select "View Source", it should look something like:
<param name='image' value='http://192.168.110.1/tmp/tc10747138481992.gif'>

Mapserver should be replacing [host] and [img] with 192.168.110.1 and 
/tmp/tc10747138481992.gif.

192.168.110.1 is your host. /tmp/tc10747138481992.gif is the image which 
mapserver created and the path to the image. In my case the path is 
/tmp/ and the image name is tc10747138481992.gif, which is the name of 
my map "tc" and a semi-random number. Each time you request a map from 
mapserver it creates a new image so this will be different each time.

In your message, above, you have a slash (/) between the host and image 
in one case and a comma (,) in another case. In your source template 
file, there should be nothing, it should look like:
    <param name='image' value='http://[host][img]'>
When the page is rendered, the [host] and [img] should be replaced as 
discussed above. This doesn't appear to be happening to you [img] tag if 
I am reading your email correctly.

Try just sticking the [img] somewhere on your page an see if mapserver 
does the appropriate replacement on it. Chek that an image is indeed 
being created for each request. Check your IMAGEPATH and IMAGEURL in 
your map file.

-- 
Richard Greenwood
www.greenwoodmap.com



More information about the MapServer-users mailing list