[Chameleon] Projection and ZoomAllLayer fail

Delfos, Jacob Jacob.Delfos at maunsell.com
Mon Jul 17 23:11:14 EDT 2006


Thio,
 
The projection definition in your layers should not be set to auto, because the source data is only ever in one projection. Just because you shift a map to another zone, for instance, does not cause your source data to change. MapServer (Chameleon) mus know where to re-project the data FROM (not TO). Therefore, IF your source data is in zone 49s, put this in your layers:
 
    PROJECTION
      "init=AUTO:32749"
    END
 
Make sure to find out what projection your source data is in. If in doubt, send us an example coordinate.
 
I suppose you could put the automatic projection in your mapfile. But it may confuse users if they can see coordinates without knowing what they are in. 
 
Best regards,
 
Jacob
 
 


________________________________

	From: chameleon-bounces at lists.maptools.org [mailto:chameleon-bounces at lists.maptools.org] On Behalf Of Thio
	Sent: 18 July 2006 10:58
	To: Chameleon Mailist
	Subject: [Chameleon] Projection and ZoomAllLayer fail
	
	
	Dear forumers..
	
	
	[Projection fail]
	I'd try to configure my map file with a fixed projection. I use the UTM WGS84 49S for my data, so i decide to use "auto:42001". But those configuration is fail, my browser only shows : 
	
	Warning: [MapServer Error]: msProcessProjection(): No such file or directory in C:\ms4w\apps\chameleon\htdocs\common\wrapper\map_session.php on line 215
	
	Warning: Failed to open map file C:\ms4w\apps\webgis\mapscript/../map/webinfo.map in C:\ms4w\apps\chameleon\htdocs\common\wrapper\map_session.php on line 215
	
	Fatal error: Call to a member function getprojection() on a non-object in C:\ms4w\apps\chameleon\htdocs\widgets\MapD
	
	
	Below is my map configuration :
	
	MAP
	  NAME "WebInfo"
	  STATUS ON
	  EXTENT 489495.77 9029110.98 919252.02 9298484.91
	  SIZE 500 350 
	  SHAPEPATH "../data/tab"
	  SYMBOLSET "../etc/symbols.sym"
	  FONTSET "../etc/fonts.txt"
	  IMAGETYPE GIF
	  IMAGECOLOR 255 255 255
	  UNITS METERS
	  WEB
	    IMAGEPATH "/ms4w/tmp/ms_tmp/"
	    IMAGEURL "/ms_tmp/"
	  END  
	  LEGEND
	    STATUS ON
	    OUTLINECOLOR 0 0 0
	    POSITION LL
	    KEYSIZE 18 12 
	  END
	  
	  QUERYMAP
	    STYLE HILITE
	    COLOR 255 0 0
	  END
	  PROJECTION
	    "init=auto:42001"
	  END
	  
	  LAYER
	    NAME "APJ"
	    STATUS DEFAULT
	    TYPE POLYGON
	    CONNECTIONTYPE OGR
	    CONNECTION "apj.tab"
	    CLASSITEM "APJ"
	    UNITS METERS
	    LABELITEM "APJ"
	    LABELMINSCALE 951730
	    CLASS
	      NAME "APJ BANYUWANGI"
	      EXPRESSION "APJ BANYUWANGI"
	      LABEL
	        TYPE TRUETYPE
	        FONT "sans"
	        SIZE 8
	        POSITION CC
	        COLOR 0 0 0
	        OUTLINECOLOR 251 255 158
	      END
	      STYLE
	        COLOR 70 142 68
	      END
	    END
	    CLASS
	      NAME "APJ BOJONEGORO"
	      EXPRESSION "APJ BOJONEGORO"
	      LABEL
	        TYPE TRUETYPE
	        FONT "sans"
	        SIZE 8
	        POSITION CC
	        COLOR 0 0 0
	        OUTLINECOLOR 251 255 158
	      END
	      STYLE
	        COLOR 0 255 0
	      END
	    END
	    CLASS
	      NAME "APJ GRESIK"
	      EXPRESSION "APJ GRESIK"
	      LABEL
	        TYPE TRUETYPE
	        FONT "sans"
	        SIZE 8
	        POSITION CC
	        COLOR 0 0 0
	        OUTLINECOLOR 251 255 158
	      END
	      STYLE
	        COLOR 0 0 255
	      END
	    END      
	    PROJECTION
	      "init=AUTO:42001"
	    END
	  END
	
	  LAYER
	    NAME "Town"
	    STATUS OFF
	    TYPE POINT
	    CONNECTIONTYPE OGR
	    CONNECTION "towns.tab"
	    UNITS METERS
	    MAXSCALE 951730
	    LABELITEM "NAMA_KOTA"
	    CLASS
	      NAME "Town"
	      TEMPLATE "ttt_query.html"
	      LABEL
	        TYPE TRUETYPE
	        FONT "sans"
	        SIZE 8
	        POSITION AUTO
	        COLOR 161 219 231
	        OUTLINECOLOR 255 255 255
	        PARTIALS FALSE
	      END
	      STYLE
	        SYMBOL 1
	        COLOR 235 230 48
	        SIZE 6
	      END
	    END
	    PROJECTION
	      "init=AUTO:42001"
	    END
	  END
	END
	
	
	[ZoomAllLayer fail]
	Besides, the "ZoomAllLayers" widget still fail in my application. When I click on it, nothing changes on the mapdhtml.
	
	Please tell me what i've done wrong and should i do next..
	
	
	Regards..
	

	
________________________________

	Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1¢/min. <http://us.rd.yahoo.com/mail_us/taglines/postman7/*http://us.rd.yahoo.com/evt=39666/*http://messenger.yahoo.com> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/chameleon/attachments/20060718/d9099070/attachment-0001.html


More information about the Chameleon mailing list