[Mapserver-users] invalid image extent with dhtml demo and germany map

Inge Keckeisen inke03 at gmx.net
Tue Jun 22 23:59:37 PDT 2004


Hi,

thank you for the advice to use ogrinfo. It showed me the extent of my
data, but I realized then that the extent in my mapfile was right. So
the problem with the scalebar is still there.
Another try was to project the data before and to leave out the 
projection declaration in the map file. This brought up the scalebar in 
the right way but the
zoomout function didn't work properly then. Could be that it is a 
problem when the data is in degrees and the map in meters with the dhtml 
Itasca demo?

Inge

>From: "Ernesto Vega" <ervega at microexpertos.cl>
>
  >did you try to get the extents of your map using ogrinfo ??? ogrinfo
>will show the extents of the map, use them on your mapfile.
>Ernesto


>> Hi,
>>
>> since I try to show a map of Germany with the dhtml interface of the

Itasca

>> demo the scalebar shows the wrong scale (after zooming in a lot) or

doesn't

>> appear not at all.
>> The original Itasca dhtml demo is working fine.Also my own mapfile runs

well

>> but only without the dhtml interface.
>>
>> This is what the browser brings up when right-clicking on the scalebar

icon:

>> msCalculateScale(): General error message. Invalid image extent.
>> msCalculateScale(): General error message. Invalid image extent.
>> mapserv(): Web application error. No way to generate map extent.
>> Maybe I have to change something in the mapserv.js to define the map

extent

>> but don't know what I should do explicitly. I hope someone can give me a
>> hint.
>>
>> Regards,
>> Inge Keckeisen
>>
>> Here are some snippets of the mapfile:
>> (The data is in WGS84, but I want to have it projected in 
Gauss-Krueger3)
>>
>> NAME 'Deutschland'
>> STATUS ON
>> PROJECTION
>>      'init=epsg:31467' # Gauss-Krueger Zone3
>> END
>>
>> SIZE   350 500
>> EXTENT 3228330.530 5193322.629 3988410.415 6163355.154
>> UNITS  METERS
>>
>> SCALEBAR
>>  STATUS ON
>>   LABEL
>>   COLOR 000 000 000
>>   SIZE SMALL
>>   END
>>  SIZE 250 3
>>   COLOR 0 90 230
>>   OUTLINECOLOR 100 100 100
>>  UNITS KILOMETERS
>> END
>>
>> LAYER
>>   NAME 'Bundesgebiet'
>>   GROUP 'bundesgebiet'
>>   DATA 'data/grenze'
>>   STATUS DEFAULT
>>   TYPE POLYGON
>> PROJECTION
>>      'init=epsg:4326' # WGS84
>> END
>>       CLASS
>>        NAME 'Grenze'
>>        COLOR 210 210 210
>>        OUTLINECOLOR 100 100 100
>>       END
>> END
>>





More information about the MapServer-users mailing list