[Mapserver-users] Re: thanks {Scanned}

Siki Zoltan siki at agt.bme.hu
Fri Mar 12 14:07:22 PST 2004


Hi,

On Fri, 12 Mar 2004, Pramila R Gawas wrote:

> Thank u sir,
> I am able to display static map with
> http://host/ in the src tag of the img.
> but when i try to display it using  template file address 
> http://localhost/~pramila/worldmap/init.html 
> <http://himalaya.nio.org/%7Epramila/worldmap/init.html>
Probably you misunderstood something. The template file should be
referenced in the map file in the WEB section
TEMPLATE "relative path to template from the map file"
To display the map you can use an url 
http://your_server/cgi-bin/mapserv?map=...&mode=browse
or you can use a form with hidden input fields like the itasca demo.

> it displays only the img icon ? is there something wrong in the extent / 
> scale in my **map file**. How do u calculate extent / minscale / maxscale ?
Use shapelib utility shpinfo. See shapelib.maptools.org. There are other
useful tools in shapelib.
> 
> NAME WORLD
> SIZE 500 650
> EXTENT 20 35 45 65
I can hardly imagine the extent of the world is 15 meters by 20 meters
> UNITS METERS
> SHAPEPATH "data"
Shape path should be absolute (starting from /)
> STATUS ON
> 
> LAYER
>  NAME world
>  TYPE POLYGON
>  DATA world
>    CLASS
>      COLOR 181 181 181
>      OUTLINECOLOR 50 10 100
>    END
>  STATUS DEFAULT
> END
> 
> WEB
>    TEMPLATE world.html
>    IMAGEPATH "set in init.html"
>    IMAGEURL "set in init.html"
>    MINSCALE 0
>    MAXSCALE 360
This scale is nonsense. Remove MINSCALE and MAXSCALE. 
If you see the map try to find reasonable scales.
If you have only one layer no sense to use MINSCALE, MAXSCALE.
Put MINSCALE and MAXSCALE in the definition of a layer.
Read the MAP file documentation about them.

>    METADATA
>      WMS_ONLINERESOURCE "http://localhost/~pramila/worldmap/init.html" 
> <http://himalaya.nio.or/%7Epramila/worldmap/init.html>
>   END
>  END
> END
> 
Bye
Zoltan




More information about the MapServer-users mailing list