[OpenLayers-Users] My map is displayed only at zoom level 0
Amila Maha Arachchi
amila.maha at gmail.com
Thu Feb 19 23:24:13 EST 2009
Hi,
Thanks for your quick response.
I opened the url in a new tab, but no error messages. No entries in the
error log.
I have another layer which is generated from the same map file, which I
create as a WMS layer. It shows some cities in the map. But it works for all
the zoom levels.
var cities = new OpenLayers.Layer.WMS( "Cities",
"
http://localhost:7788/cgi-bin/mapserv.exe?map=C:/ms4w/Apache/htdocs/openlayer/map/wms-test.map
",
{layers: "cities", transparent: "true", isBaseLayer: "false"});
My problematic layer is a raster layer.
Any idea???
On Thu, Feb 19, 2009 at 8:12 PM, Alexandre Dube <adube at mapgears.com> wrote:
> Hi,
>
> If you open the image url in a new tab, do you get any error message ? If
> not, see the error logs in ms4w/Apache/logs. You might find what's wrong
> there.
>
> Regards,
>
> Alexandre
>
>
> amila.maha wrote:
>
>> Hi,
>>
>> I am trying to display a map from MapServer in OpenLayer. But it is
>> displayed only when the zoom level is zero. When the zoom level is some
>> other level, only a white image is shown.
>> Can somebody help me with this??
>>
>> This is my javascript code segment for creating the map.
>>
>> var map_sv = new OpenLayers.Layer.MapServer( "Clouds",
>>
>> "
>> http://localhost:7788/cgi-bin/mapserv.exe?map=C:/ms4w/Apache/htdocs/openlayer/map/wms-test.map
>> ",
>> {layers: "clouds", isBaseLayer: "true"});
>>
>>
>> This is my map file.
>>
>> NAME "WMS-test"
>> STATUS ON
>> SIZE 512 256
>> SYMBOLSET ../etc/symbols.sym
>> EXTENT -180 -90 180 90
>> UNITS METERS
>> IMAGECOLOR 255 255 255
>> IMAGETYPE png
>> FONTSET ../etc/fonts.txt
>> CONFIG "PROJ_LIB" "C:/ms4w/proj/nad/"
>>
>>
>> WEB
>> IMAGEPATH "C:/ms4w/tmp/"
>> IMAGEURL "/ms_tmp/"
>> METADATA
>> "wms_title" "WMS Demo Server" ##required
>> "wms_onlineresource" "http://localhost:7788/cgi-bin/mapserv.exe?"
>> ##required
>> "wms_srs" "EPSG:42304 EPSG:42101 EPSG:4269
>> EPSG:4326" END
>> END
>>
>> PROJECTION
>> "init=epsg:42304" ##required
>> END
>>
>> #
>> # Start of layer definitions
>> #
>>
>> LAYER
>> NAME clouds
>> METADATA
>> "wms_title" "Clouds" ##required
>> END
>> TYPE RASTER
>> STATUS ON
>> PROJECTION
>> "init=epsg:42304" ##recommended
>> END
>> DATA "../data/test/day_clouds.tif"
>> END
>>
>> END # Map File
>>
>>
>>
>>
>>
>>
>
>
> --
> Alexandre Dubé
> Mapgears
> www.mapgears.com
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090220/f806bdf9/attachment.html
More information about the Users
mailing list