______________________________________________________________ L.
Valentini, GIS course 2011
Pmapper exercise Mapfile editing In your mapfile, insert inside the MAP object the EXTEND (min miny ma may! and "NIT# ta$s% &ou can use the same 'alues used for the Map#er'er eercise% Then you can (rite the #)APEPAT), #&M*+,#ET and -+NT#ET ta$s (pay attention to (rite the correct paths.!/ #)APEPAT) 0%%1%%1data1shpf0 #&M*+,#ET 0%%1common1symbols1symbols2pmapper%sym0 -+NT#ET 0%%1common1fonts1fontset%tt0 As in the pre'ious mapfile, you can set the IMA3E4+,+5 (e%$%/ 677 677 677!% In addition in this case you ha'e to add 6 ta$s/ IMA3ET&PE pn$ -+5MAT+PTI+N 8INTE5,A4E9+--: The first ta$ sets the output format to $enerate ($if, pn$, jpe, (bmp, $tiff, s(f or user defined!, the second is used to specify if the output ima$es should be interlaced or not% No( (e ha'e to declare the PROJECTION of the map/ P5+;E4TI+N 0init9eps$/<==<0 END > ______________________________________________________________ L. Valentini, GIS course 2011 (or "+proj=tmerc +lat_0=0 +lon_0=9 +k=0.9996 +x_0=1500000 +y_0=0 +ellps=intl +units=m +no_defs +to!s"#=$10#.1%$#9.1%$9.9% 0.9&1%$'.91&% 0.&1#%$11.6""( (In the eample the projection set is the 3auss *oa$a 5ome?= one% In case of "TM @3#A? you can use/ 0init9eps$/<6B<60 or 0Cproj9utm CDone9<6 Cellps9@3#A? Cdatum9@3#A? Cunits9m CnoEdefs noEdefs0!% Inside the WEB object (remember to close it (ith the proper END.! insert the filename of the TEMP,ATE file to use in presentin$ the results to the user in an interacti'e mode, the IMA3EPAT) (path to the temporary directory fro (ritin$ temporary files and ima$es% Must be (ritable by the user the (eb ser'er is runnin$ as% Must end (ith a 1 or dependin$ on your platform! and the IMA3E"5, (base "5, for IMA3EPAT)% This is the "5, that (ill taFe the (eb bro(ser to IMA3EPAT) to $et the ima$es!/ @E* TEMP,ATE 0map%phtml0 IMA3EPAT) 01usr1local1$eoEtemp10 IMA3E"5, 01tmp10 END The REFERENCE object has to be filled (ith the characteristics of the reference map that you (ant to use, as the etent (you should use the same etent of the map!, the ima$e file (e%$%/ 8ref%pn$:!, the siDe and colors/ 5E-E5EN4E EXTENT minx miny maxx maxy ()*+,- replace it. your extent/( IMA3E 0%%1%%1ima$es1ref%pn$0 #IGE 6== >== 4+,+5 2> 2> 2> +"T,INE4+,+5 677 = = END At this point you can start to insert the LAER! you (ant to display% -or the p%mapper eample you are asFed to insert these layers/ 6 ______________________________________________________________ L. Valentini, GIS course 2011 "TM#$%m &raster' #et this layer on% #ince this is a @M# layer (pro'ided by the ,ombardia 5e$ion! (e ha'e to insert the proper parameters for the connection to the ser'ice/ 4+NNE4TI+N 0http/11(((%carto$rafia%re$ione%lombardia%it1Arc3I#H<1ser'ices1(ms1dtm6=E(ms1Ma p#er'er1@M##er'er0 4+NNE4TI+NT&PE @M# ()*+,- rite t.e text 0eteen 12 on t.e same line( Then you ha'e to insert the ta$ TEMP,ATE 8'oid: to allo( the Iueries also (hen the layer is on% Then in the METADATA object you ha'e to insert some parameters for the @M# ser'ice, as the reference system, the name of the layer you (ant to $et, the ser'er 'ersion and the format% &ou can set also the DE#45IPTI+N parameter that is the name that you (ill see in the le$end (e%$%/ 8DTM 6=m:!/ TEMP,ATE 0'oid0 METADATA DE#45IPTI+N 0DTM 6=m0 0(msEsrs0 0EP#3/<==<0 0(msEname0 0=0 0(msEser'erE'ersion0 0>%>%>0 0(msEformat0 0ima$e1pn$0 END (END of the METADATA object, then END also the layer.! #ee http/11mapser'er%or$1o$c1(msEclient%html as a reference% (.ttp-33.carto!rafia.re!ione.lom0ardia.it3!eoportale34isco5ery6er5let( Ort(p)(t( &raster' Also in this case it is a @M# layer/ < ______________________________________________________________ L. Valentini, GIS course 2011 4+NNE4TI+N 0http/11(((%carto$rafia%re$ione%lombardia%it1Arc3I#H<1ser'ices1(ms1ortofotoE(ms1M ap#er'er1@M##er'er0 4+NNE4TI+NT&PE @M# TEMP,ATE 0'oid0 METADATA 0(msEsrs0 0EP#3/<==<0 0(msEname0 0=0 0(msEser'erE'ersion0 0>%>%>0 0(msEformat0 0ima$e1pn$0 END CTR &raster' A$ain a @M# layer/ 4+NNE4TI+N 0http/11(((%carto$rafia%re$ione%lombardia%it1Arc3I#H<1ser'ices1(ms1ctrE(ms1Map#er 'er1@M##er'er0 4+NNE4TI+NT&PE @M# TEMP,ATE 0'oid0 METADATA DE#45IPTI+N 04T5 2 scale >/>====0 0(msEsrs0 0EP#3/<==<0 0(msEname0 0=0 0(msEser'erE'ersion0 0>%>%>0 0(msEformat0 0ima$e1pn$0 END "TM#$%m#m &raster' In this case you are $oin$ to use a @M# layer pro'ided by the En'ironmental Ministry, so the connections parameter become/ ? ______________________________________________________________ L. Valentini, GIS course 2011 4+NNE4TI+N 0http/11(ms%pcn%minambiente%it1c$i2bin1mapser'%eeJ map91msEo$c1 ser'ice1dtmE6=mEf<6%map0 4+NNE4TI+NT&PE @M# TEMP,ATE 0'oid0 METADATA DE#45IPTI+N 0DTM 6=m0 0(msEsrs0 0EP#3/<6B<60 0(msEname0 0DTME6=MEf<60 0(msEser'erE'ersion0 0>%>%>0 0(msEformat0 0ima$e1pn$0 END Notice that in this case the layer is pro'ided in "TM @3#A? 2 <6N Done (EP#3 code/ <6B<6!, so it is reprojected by Map#er'er% &ou can clearly see the errors due to this reprojection, thatKs (hy it is important to Feep in mind the reference system of your project and checF if it is pro'ided by the @M#1@-# ser'ice% (6ee- .ttp-33.pcn.minam0iente.it378)49)3catalo!oms.jsp:lan=en ( m*nicipalities &p(l+g(n' The municipalities layer is a LT&PE poly$onK one% #ince it is a shapefile that you can find in the default data folder, you can (rite just the name of the file (in this case 8municipalities:! (ith no etension in the DATA ta$% @e (ant to display a label for each municipality that sho(s the name and (e (ant to represent the municipalities (ith different colors accordin$ to the district% As in the Map#er'er case, (e can use/ ,A*E,ITEM 0Name0 4,A##ITEM 0District0 ,A*E,MAX#4A,EDEN+M >===== (to s.o t.e la0els only 0elo a certain scale denom( After those ta$s (e can insert the 4,A## objects/ 7 ______________________________________________________________ L. Valentini, GIS course 2011 4,A## NAME 0District of 4omo0 or ;arese EXP5E##I+N 04omo0 or ;arese ,A*E, T&PE bitmap #IGE small P+#ITI+N M (e%$%/ A"T+! 4+,+5 M END N #tyle to be used for the feautures of the layer% #T&,E 4+,+5 M +"T,INE4+,+5 M END END Then (e ha'e to insert the parameters related to the Iueries% @e can use a 8'oid: template and set the T+,E5AN4E in the selection eIual to B (piels!% In the METADATA object, besides the DE#45IPTI+N ta$, you can indicate (hich fields you (ant to sho( in the Iuery result and the headers of the table% E%$%/ TEMP,ATE 0'oid0 T+,E5AN4E B METADATA DE#45IPTI+N 0Municipalities0 5E#",TE-IE,D# 0NAME,P+P",ATI+N,#"5-A4E,DI#T5I4T0 5E#",TE)EADE5# 0Name,Population OinhabitantsP,#urface OFmIP,District0 END B ______________________________________________________________ L. Valentini, GIS course 2011 C(m(#CTR#c(l, &raster' This is a LT&PE rasterK layer that (ants to represent the tiff file stored in the LrasterK folder/ DATA 0%%1%%1data1raster14T5EcolE*?a7%tif0 It is in the "TM projection (Done <6N!, so (e ha'e to add/ P5+;E4TI+N 8init9EP#3/<6B<6: END @e (ant to sho( it just at a scale factor lo(er than >=====, so (e (rite/ MAX#4A,EDEN+M >===== As before, (ith the ta$ DE#45IPTI+N in the METADATA object (e can (rite the name in the le$end, for eample/ 84oloured 4T5:% In this case (e (ant to add it in a $roup, so (e (rite Q35+"PQ inside the ,A&E5 object/ 35+"P ctr R ______________________________________________________________ L. Valentini, GIS course 2011 C(m(#CTR#c(l$ &raster' As the pre'ious one, this is a LT&PE rasterK layer that (ants to represent the tiff file stored in the LrasterK folder/ DATA 0%%1%%1data1raster14T5EcolE*7a>%tif0 As before, (e ha'e to specify the projection eps$ code% @e (ant to sho( it just at a scale factor lo(er than >=====, so (e (rite/ MAX#4A,EDEN+M >===== As before, (ith the ta$ DE#45IPTI+N in the METADATA object (e can (rite the name in the le$end, for eample/ 84oloured 4T5:% @e (ant it to be part of the same $roup of the other coloured 4T5, so (e (rite Q35+"PQ inside the ,A&E5 object/ 35+"P ctr A ______________________________________________________________ L. Valentini, GIS course 2011 Ri-ers &raster' A$ain a @M# layer from En'ironmental Ministry ser'er% This time the url is/ 4+NNE4TI+N 0http/11(ms%pcn%minambiente%it1c$i2bin1mapser'%eeJmap91msEo$c1 ser'ice1asteflu'ialiE<6%map0 and the METADATA object/ METADATA 0(msEsrs0 0EP#3/<6B<60 0(msEname0 0asteEflu'ialiEf<60 0(msEser'erE'ersion0 0>%>%>0 0(msEformat0 0ima$e1pn$0 END Rail.a+s &line' This is a LT&PE lineK @-# layer pro'ided by the En'ironmental Ministry ser'er% @e specify the projection/ P5+;E4TI+N 0init9eps$/<6B<60 END And then the connection parameters/ 4+NNE4TI+NT&PE @-# 4+NNE4TI+N 0http/11(ms%pcn%minambiente%it1c$i2bin1mapser'%eeJmap91msEo$c1 (fs1ferro'ieE(fsEf<6%map0 TEMP,ATE 0'oid0 METADATA 0(fsEtypename0 0lineeEferro'iarieEf<60 0(fsE'ersion0 0>%=%=0 0(fsEreIuestEmethod0 03ET0 0(fsEconnectiontimeout0 0B=0 H ______________________________________________________________ L. Valentini, GIS course 2011 0(fsElatlon$boundin$bo0 0?AB=== 7=77H=7 76?HHH 7=ARH=?0 END (6ee as a reference- .ttp-33mapser5er.or!3o!c3fs_client..tml( In case of this @-# ser'ice, you can set the 0(fsElatlon$boundin$bo0 parameter (ith the boundin$ bo coordinates in the reference system of the ser'ice (e%$%/ "TM @3#A? 2 <6N! because it is a ser'ice pro'ided for the entire national territory so the layer co'er a 'ery lar$e area and it could be hea'y to load% @e can decide to represent it (ith a style that reminds the user a rail(ay, so for eample/ #&M*+, NAME QrailQ T&PE E,,IP#E P+INT# > > END #T&,E >= >= >= >= END END 4omin$ bacF to the layer in the mapfile, (e can use the class object/ 4,A## #T&,E #&M*+, 0rail0 4+,+5 7> 7> 7> #IGE 6 END END >= Pay attention. you ha'e to insert this ne( symbol in the /c(nfig/c(mm(n/s+m0(ls/s+m0(ls1pmapper2s+m file, nested in the #&M*+,#ET object% ______________________________________________________________ L. Valentini, GIS course 2011 la3es &p(l+g(n' This layer represents the shapefile 8,a$oEpoly: stored in the default folder% @e (ant to allo( the Iuery in such a (ay that the user can obtain a table (ith t(o columns/ LNameK and L#urface OmIPK/ METADATA DE#45IPTI+N 0,aFes0 5E#",TE-IE,D# 0N+MEE,3,A5EA0 5E#",TE)EADE5# 0Name,#urface OmIP0 END stati(ns &p(int' This file is stored in the folder L3auss*oa$aK inside the default one/ DATA Q3auss*oa$a1stationsQ and (e (ant to ha'e a different representation accordin$ to the company that pro'ides the ser'ice in that station and labels to sho( the station name% The t(o companies ha'e different 4+MPE4+DE so (e can use this parameter to di'ide the t(o cate$ories/ 4,A##ITEM 04+MPE4+DE0 ,A*E,ITEM 0NAME0 ,A*E,MAX#4A,EDEN+M >===== 4,A## NAME 0-NM #tations0 EXP5E##I+N 0-NM0 ,A*E, T&PE bitmap P+#ITI+N auto #IGE small 4+,+5 = = 677 END >> ______________________________________________________________ L. Valentini, GIS course 2011 #T&,E #&M*+, Q%%1common1symbols1trainEblue%pn$Q END END 4,A## NAME 0-# #tations0 EXP5E##I+N 0-#0 ,A*E, T&PE bitmap P+#ITI+N auto #IGE small 4+,+5 677 = = END #T&,E #&M*+, Q%%1common1symbols1trainEred%pn$Q END END TEMP,ATE 0'oid0 T+,E5AN4E B In addition, (e (ant that (hen the user clicFs on the L4+MPAN&K filed in the Iuery table the (iFi pa$e about this company is sho(n in another tab of the bro(ser% In the LMETADATAK object (e add a line/ METADATA DE#45IPTI+N 0#tations (3* 2 5oma?=!0 RE!4LT#5PERLIN6 7COMPAN7 5E#",TE-IE,D# 0NAME,4+MPAN&,4+MPE4+DE,,INE0 5E#",TE)EADE5# 0Name,4ompany,4ompany 4ode,,ine0 END >6 ______________________________________________________________ L. Valentini, GIS course 2011 In the file c(nfig/defa*lt/c*st(m28s (e ha'e to add/ 92extend&PM2C*st(m: ; // !ample 5+perlin3 f*ncti(n f(r res*lt .ind(. (pen5+perlin3< f*ncti(n&la+er: fldName: fld=al*e' ; s.itc)&la+er' ; case >stati(ns>< if &fldName ?? >COMPAN>' ; .ind(.2(pen&>)ttp</> @ >/en2.i3ipedia2(rg/.i3i/> @ fld=al*e'A B 0rea3A
defa*lt< alert &>!ee f*ncti(n (pen5+perlin3 in c*st(m28s< > @ la+er @ > 1 > @ fldName @ > 1 > @ fld=al*e'A B B stati(ns#*tm &p(int' Also this layer represents train stations, but in this case the shapefile is projected in "TM @3#A? 2 <6N and it is stored directly in the default data folder% Turnin$ on both the layers (e can notice directly the displacement introduced in the representation due to the reprojection% ,A&E5 NAME 0stationsEutm0 #TAT"# off DATA QstationsQ T&PE point 4,A##ITEM 04+MPE4+DE0 ,A*E,ITEM 0NAME0 ,A*E,MAX#4A,EDEN+M >===== P5+;E4TI+N 0init9eps$/<6B<60 END 4,A## >< ______________________________________________________________ L. Valentini, GIS course 2011 NAME 0-NM #tations0 EXP5E##I+N 0-NM0 #T&,E symbol QsIuareQ color = = 677 siDe >= END END 4,A## NAME 0-# #tations0 EXP5E##I+N 0-#0 #T&,E symbol QsIuareQ color 677 = = siDe >= END END TEMP,ATE 0'oid0 T+,E5AN4E B METADATA DE#45IPTI+N 0#tations ("TM 2 @3#A?!0 5E#",TE-IE,D# 0NAME,4+MPAN&,4+MPE4+DE,,INE0 5E#",TE)EADE5# 0Name,4ompany,4ompany 4ode,,ine0 END END all*-i(nal1c(nes &line' As in the Map#er'er eample, you can add a MapInfo format (8o$r: folder!/ allu'ional2 cones%tab% In this case you ha'e to specify the connection type and the path to the file/
4+NNE4TI+NT&PE +35 4+NNE4TI+N 0%%1%%1%%1data 1o$r1allu'ional2cones%tab0 >? ______________________________________________________________ L. Valentini, GIS course 2011 @e can choose to display the layer only abo'e a certain scale and (ith a certain style/
MAX#4A,EDEN+M >===== 4,A## NAME 0Allu'ional cones0 #T&,E 4+,+5 = 6>7 6?= END END METADATA DE#45IPTI+N 0Allu'ional cones0 END A"" A LOCO &f(r t)e .e0CI! pr(8ect' The procedure to add a lo$o (a (atermarF on the map! is the same than addin$ another layer% It has to be placed abo'e all other layers, so at the end of the mapfile IN#IDE the MAP object (before the last END!% It is a particular layer (ith just a feature (a point! represented by a symbol (the bitmap ima$e, that is the lo$o itself!% To do so (e ha'e to/ insert the s+m0(l in the file 0%%1common1symbols1s+m0(ls1pmapper2s+m0/ #&M*+, NAME 0lo$o0 T&PE PIXMAP IMA3E 0lo$o%pn$0 END insert the la+er in the mapfile/ ,A&E5 NAME 0credits0 #TAT"# DE-A",T >7 ______________________________________________________________ L. Valentini, GIS course 2011 T5AN#-+5M lr T&PE ANN+TATI+N -EAT"5E P+INT# 2R= 2B= END TEXT 0 0 END 4,A## #T&,E #&M*+, 0lo$o0 N#IGE <B END ,A*E, T&PE *ITMAP P+#ITI+N ", 4+,+5 = = = *"--E5 7 END END END The parameter LT5A#-+5MK tells Map#er'er to pass from your coordinates to ima$e coordinates from the LlrK (lo(er ri$ht! corner% In this case the lo$o is then placed at coordinates 2R= 2B=% >B ______________________________________________________________ L. Valentini, GIS course 2011 Dc(nfig#defa*lt2xmlE editing Inside the SiniT ta$ are nested all the confi$urations ta$s that (e (ill use to customiDe the (eb3I#% -irst of all, (e can insert some plu$ins inside the SiniTSpmapperT ta$s (after Sdebu$,e'elT<S1debu$,e'elT!/ http/11s'n%pmapper%net1trac1(iFi1A'ailablePlu$ins PL4CIN!< Fpl*ginsGexp(rtF/pl*ginsG Plu$in to eport Iuery results to 'arious formats% It adds eport radio buttons to Iuery result display% 4urrently implemented format/ X,#, PD-, 4#U, #)P (eperimental!% Define the formats you (ant to offer by addin$ in confi!_default.xml file/ Splu$ins4onfi$T %%%% SeportT SformatsT4#US1formatsT SformatsTPD-S1formatsT SformatsT#)PS1formatsT S1eportT %%%% S1plu$ins4onfi$T N+TE/ Eport to X,# reIuires the installation of the PEA5 modules #preadsheetEEcelE@riter and +,E% Fpl*ginsG scale0ar F/pl*ginsG D)TM, scalebar based on a library from Tim #chaub of 4ommEn #pace% Enable the plu$in by addin$ a line in confi!_default.xml file and add t(o Sdi'T in the map.phtml, liFe >R ______________________________________________________________ L. Valentini, GIS course 2011 Sdi' id90scale5eference0T Sdi' id90scalebar0TS1di'T S1di'T #tyle of the scale bar can be defined 'ia 4## file% Fpl*ginsGtransparenc+$F/pl*ginsG Add a slider at the ri$ht side of each layer 1 $roup of layers in the Table +f 4ontents% The sliders could represent either transparency or opacity percenta$e% Transparency plu$in ha'e to be present in p%mapper installation, but not necessarily acti'ated% Enable the plu$in by addin$ a line in confi!_default.xml file, then you can specify if sliders ha'e to represent opacity or transparency by addin$ in confi!_default.xml file/ SpmapperT SiniT %%%% Splu$ins4onfi$T %%%% Stransparency6T Suse+pacityToffS1use+pacityT S1transparency6T %%%% S1plu$ins4onfi$T S1iniT S1pmapperT If you donKt specify it, the default settin$ is to represent transparency% >A ______________________________________________________________ L. Valentini, GIS course 2011 Fpl*ginsGr(*nded0(xesF/pl*ginsG This small plu$in add styled corners to the "I% Enable the plu$in by addin$ a line in confi!_default.xml file% CONFIC4RATION!< After the plu$ins (e can (rite some confi$uration ta$s such as/ Sconfi$T SpmEconfi$ElocationTdefaultS1pmEconfi$ElocationT SpmEja'ascriptElocationTja'ascriptS1pmEja'ascriptElocationT SpmEprintEconfi$fileTcommon1print%mlS1pmEprintEconfi$fileT SpmEsearchEconfi$fileTinlineS1pmEsearchEconfi$fileT S1confi$T C(nfig#l(cati(n/ directory that contains the mapfile Ja-ascript#l(cati(n/ directory of the ja'ascript scripts Print#c(nfigfile/ relati'e path to the print confi$uration ml file !earc)#c(nfigfile/ in this case (e (ill (rite the search confi$urations inside the confi!_default.xml file, so LinlineK% MAP/ Nested in the SmapT ta$ (e can (rite all the confi$urations concernin$ the map that (e (ant to represent/ SmapT Smap-ileTcomo%mapS1map-ileT mapfile t( *se StplMap-ileTcommon1template%mapS1tplMap-ileT template map >H ______________________________________________________________ L. Valentini, GIS course 2011 Then (e can subdi'ide your layers in different cate$ories% Each cate$ory is nested inside Scate$oriesT and it is characteriDed by a name% E%$%/ Scate$oriesT Scate$ory name90@M# ,ombardia 5e$ion0T S$roupT+rtophotoS1$roupT S$roupTDTME6=mS1$roupT S$roupT4T5S1$roupT S1cate$oryT M S1cate$oriesT To insert a $roup, liFe the QctrQ $roup, (e donQt ha'e to insert the layers but the name of the $oup, so/ S$roupTctrS1$roupT inside the raster cate$ory% If you use one of the cate$ory names already (ritten in p%mapper (stored in LincphpVlocaleK you can find some php files, one for each lan$ua$e! it (ill be directly translated in the lan$ua$e that you choose% The cate$ory names already present are/ WEslOQcatEadminQP 9 QAdministrati'e DataQX WEslOQcatEinfrastructureQP 9 QInfrastructurQX WEslOQcatEnatureQP 9 QNature2spatial DataQX WEslOQcatErasterQP 9 Q5aster DataQX WEslOQcatEsatima$esQP 9 Q#atellite Ima$eryQX WEslOQcatEsrtmQP 9 Q#5TM dataQX &ou can decide also to (rite other lines in the php file of your lan$ua$e in order to let p%mapper Fno( the translation and sho( it (hen you chan$e the lan$ua$e% (E%$%/ IK'e add the line 8WEslOQ@M# ,ombardia 5e$ionQP 9 Q@M# 5e$ione ,ombardiaQX: to my Llan$ua$eEit%phpK file!%
Each layer has to be (ritten into a S$roupT ta$% 5emember that you ha'e to use the names of the layer (ritten in the mapfile% 6= ______________________________________________________________ L. Valentini, GIS course 2011 +nce you ha'e inserted all the cate$ories, you ha'e to (rite all you layer $roups inside the ta$ Sall3roupsT/ Sall3roupsT S$roupT4omoE4T5S1$roupT S$roupT5i'ersS1$roupT S$roupTlaFesS1$roupT S$roupTctrS1$roupT M S1all3roupsT Then you can specify (hich layers you (ant to sho( as a default (hen the user enter the (eb3I#/ Sdef3roupsT S$roupTlaFesS1$roupT S$roupTmunicipalitiesS1$roupT S1def3roupsT (3roups1,ayers can be mutually disabled, so if one is clicFed the other one (ill be disabled/ SmutualDisable,istT S$roupTlayer>S1$roupT S$roupTlayer6S1$roupT S1mutualDisable,istT! &ou can define some other settin$s, such as/ SlayerAuto5efreshT>S1layerAuto5efreshT a*t(maticall+ refres) map .)en la+ers selecti(n c)anged &%/,' Sim$-ormatTpn$S1im$-ormatT image f(rmat f(r map and legend ic(ns: li3e png: agg#png: 8peg2 4se t)e same f(rmat defined as 6> ______________________________________________________________ L. Valentini, GIS course 2011 O4TP4TFORMAT in t)e mapfile &image f(rmat f(r legend ic(ns' SaltIm$-ormatTjpe$S1altIm$-ormatT alternati-e Image f(rmat f(r map *sef*l eg2 f(r imager+ data
SsliderMaTmaS1sliderMaT SsliderMinT>==S1sliderMinT S1mapT H4ER< In the Iuery part (e can specify all the parameters related to the Iuery (e (ant to allo(% SIueryT Slimit5esultT<==S1limit5esultT Shi$hli$ht4olorT= 677 677S1hi$hli$ht4olorT Shi$hli$ht#electedT>S1hi$hli$ht#electedT SautoGoomTnIueryS1autoGoomT SautoGoomTsearchS1autoGoomT SDoomAllTsearchS1DoomAllT SDoomAllTnIueryS1DoomAllT
Smap6unicodeT>S1map6unicodeT S1localeT 6< categ(ries !t+le in TOC &(nl+ )as effect .)en *seCateg(ries ? ,'< tree (r flat 1 attac)ed< t(get)er .it) TOC 1 s.ap< s.apping .it) TOC *se categ(ries t( t)ematicall+ gr(*p la+ers categ(ries defined in incp)p/c*st(m2p)p .(r3s f(r TOC setting >flat> and >tree> *se c)ec30(xes f(r en/disa0le c(mplete categ(ries .it) c)ild gr(*ps/la+ers la+er list &TOC' a*t(maticall+ *pdated acc(rding t( scale ic(n Widt)/5eig)t in pixels defa*lt lang*age defa*lt c)aracter set 4TF1L if map file c(ntains n(n1A!CII c)aracters:eg f(r la+er "E!CRIPTION (r CLA!! names: and is n(t in 4TF &4NICO"E' enc(ding set -al*e t( , extent 0*ffer f(r I((m extent f(r p(int la+ers in J*eries -al*e in map *nits extent 0*ffer f(r I((m extent f(r n(n1p(int la+ers in J*eries -al*e in a fracti(n (f t)e (riginal extent ______________________________________________________________ L. Valentini, GIS course 2011 PRINT< SprintT SpdfresT6S1pdfresT SprintIm$-ormatTpn$S1printIm$-ormatT SprintAltIm$-ormatTjpe$S1printAltIm$-ormatT S1printT "OWLOA"< Sdo(nloadT Sdpi,e'elsT>7=S1dpi,e'elsT Sdpi,e'elsT6==S1dpi,e'elsT Sdpi,e'elsT<==S1dpi,e'elsT S1do(nloadT !EARC5 ITEM< In p%mapper you ha'e the possibility to implement an easy searchin$ tool% To do so, you can (rite an ml file (ith all the settin$s or (rite them directly in confi!_default.xml% @e (ant to define a search for/ M*nicipalit+/ name of the municipality (layer/ municipalities, field/ 0NAME0! "istrict/ name of the district (layer/ municipalities, field/ 0DI#T5I4T0! P(p*lati(n/ number of inhabitants in a municipality (layer/ municipalities, field/ 0P+P",ATI+N0! !tati(n/ name of a train station (layer/ stations, field/ 0NAME0! 6? P"F print res(l*ti(n2 Fact(r t( increase res(l*ti(n f(r 0etter image J*alit+ print f(rmats "PI le-els f(r map d(.nl(ad 1 *sed in d(.nl(addlg2p)tml ______________________________________________________________ L. Valentini, GIS course 2011 La3e/ name of the laFe (layer/ laFes, field/ 0N+MEE,30! E2g2,< M*nicipalit+ Ssearchitem name90municipalities0 description90Municipality0T Slayer type90shape0 name90municipalities0T Sfield type90s0 name90NAME0 description90Municipality0 (ildcard90=0 1T S1layerT S1searchitemT In the ta$ Fsearc)itemG you ha'e to insert the parameters LnameK 9 uniIue identifier, typically the same as layer name if it is uni'oIue, and Ldescripti(nK 9 name 'isible in 3"I (see fi$ure abo'e!% Nested inside you ha'e the Fla+erG ta$, in (hich you ha'e to define the Lt+peK 9 data source type (possible 'alues/ LshapeK, Lpost$isK, LyK, LoracleK!, and LnameK 9 layer name in the mapfile% Then you ha'e the final FfieldG ta$, in (hich you ha'e the Lt+peK 9 LsK for strin$ field, LnK for numeric field, LnameK 9 field name in dataset, Ldescripti(nK 9 name 'isible in 3"I, L.ildcardK 9 0=0/ search al(ays uses a Qnon2eactQ pattern matchin$X 0>0/ reIuires that the user eplicitly adds 0Z0 for (ildcards to his search strin$ 060/ eact search, usually just appropriate for Qsu$$estQ or QoptionsQ% E2g2$< P(p*lati(n Ssearchitem name90population0 description90Population T90T Slayer type90shape0 name90municipalities0T Sfield type90n0 name90P+P",ATI+N0 description90Population T90 (ildcard90=0 compare90T901T S1layerT S1searchitemT In this case (e ha'e add the parameter LcompareK because (e (ant to search the municipalities (ith a population eIual or $reater than a certain 'alue inserted by the user% Another (ay could be to define the operators that (e (ant to use/ Sdefinition type90operator0T 67 ______________________________________________________________ L. Valentini, GIS course 2011 Soption name90T0 'alue90T0 1T Soption name9090 'alue9090 1T Soption name90S0 'alue90S0 1T S1definitionT 6B ______________________________________________________________ L. Valentini, GIS course 2011 D*ielements2p)pE editing The purpose of this php file is to create "ser Interface )TM, elements, such as/ map Done toolbar T+4 and le$end container tool linFs tabs for T+41le$end containers reference map search form scale Doom slider header1footer coordinates display @e are not $oin$ to see into detail all the script, just a little add in the footer function% -or instance, (e (ant to add t(o fla$s (ith a linF in order to choose the lan$ua$e of our (eb3I#/ Sdi' style9V0float/ri$htXV0T Sa href9V0http/11(eb$is%como%polimi%it13I#course>>1pmapperEutenteXX1mapEdefault%phtml Jlan$ua$e9it[confi$9defaultV0T Sim$ src9V0ima$es1it%$ifV01TS1aT S1di'T Sdi' style9V0float/ri$htXV0T Sa href9V0http/11(eb$is%como%polimi%it13I#course>>1pmapperEutenteXX1mapEdefault%phtml Jlan$ua$e9en[confi$9defaultV0T Sim$ src9V0ima$es1en%$ifV01TS1aT S1di'T )*+,- su0stitute <==> it. you user num0er. 6R ______________________________________________________________ L. Valentini, GIS course 2011 In the same (ay you can add the lo$o of the Politecnico (ith the url to the home pa$e% Main references: http/11s'n%pmapper%net1trac1(iFi1Xml-ile#ettin$s http/11s'n%pmapper%net1trac1(iFi1DocManualsearch 6A