[MS4W-Users] gmap cannot redraw layer

Jeff McKenna jmckenna at gatewaygeomatics.com
Mon Jul 5 07:40:48 EST 2010


Hello Adri,

(note that the correct email address to use is
ms4w-users at lists.maptools.org )

If you are referring to the MS4W add-on package named "PHP/MapScript
Sample Application", or commonly referred to as "GMap", then yes there
is a known problem with it; since PHP version 5.3.0 the tools in GMap do
not work.  Hopefully the issue will be resolved soon.

Sorry for that.

-jeff



-- 
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/




adri muhammad wrote:
> hi.. im a newbie here. when i click on preview, redraw and change size 
> on gmap, all layer become blank. why? help me please
>  
> this my map file code, this code export from Gix Export tool
>  
> MAP
>   NAME 'View1'
>   SIZE 600 400
>   EXTENT 427369.70625000 9132921.00000000 434742.73125000 9141875.00000000
>   UNITS meters
>   RESOLUTION 72
>   CONFIG PROJ_LIB 'C:/Proj/'
>   DATAPATTERN ''
>   TEMPLATEPATTERN ''
>   SHAPEPATH 'c:\ms4w\apache\htdocs\00\data\'
>   SYMBOLSET 'c:\ms4w\apache\htdocs\00\data\02.sym'
>   FONTSET 'c:\ms4w\apache\htdocs\00\data\02.fnt'
>   STATUS on
>   IMAGECOLOR 255 255 255
>   IMAGETYPE gif
>   STATUS on
>   DEBUG false
>  
>   WEB
>     MINSCALE 0
>     IMAGEPATH '/ms4w/tmp/ms_tmp/'
>     IMAGEURL '/ms_tmp/'
>     LOG 'c:\ms4w\apache\htdocs\00\htdocs\02.log'
>     METADATA
>     END #METADATA
>   END  #WEB
>  
>   REFERENCE
>     IMAGE 'c:\ms4w\apache\htdocs\00\data\02.jpg'
>     EXTENT 427369.70625000 9132921.00000000 434742.73125000 9141875.00000000
>     STATUS on
>     COLOR -1 -1 -1
>     OUTLINECOLOR 255 255 0
>     SIZE 110 120
>     #MARKER
>     #MARKERSIZE
>     #MINBOXSIZE
>     #MAXBOXSIZE
>   END  #REFERENCE
>  
>   LEGEND
>     IMAGECOLOR 255 255 255
>     OUTLINECOLOR -1 -1 -1
>     KEYSIZE 18 12
>     KEYSPACING 2 2
>     POSTLABELCACHE true
>     POSITION ll
>     LABEL
>       ANTIALIAS true
>       BACKGROUNDCOLOR 255 255 255
>       BACKGROUNDSHADOWCOLOR -1 -1 -1
>       BACKGROUNDSHADOWSIZE 2 2
>       OUTLINECOLOR -1 -1 -1
>       COLOR 0 0 0
>       FONT 'Arial-Normal'
>       SIZE 10
>       TYPE truetype
>     END
>     STATUS on
>   END  #LEGEND
>  
>   SCALEBAR
>     BACKGROUNDCOLOR 255 255 255
>     COLOR 0 0 0
>     IMAGECOLOR 255 255 255
>     INTERVALS 4
>     LABEL
>       COLOR 0 0 0
>       SIZE small
>       TYPE bitmap
>       ANTIALIAS true
>     END
>     OUTLINECOLOR 0 0 0
>     POSITION lr
>     POSTLABELCACHE true
>     SIZE 200 4
>     STATUS on
>     STYLE 0
>     UNITS meters
>   END   #SCALEBAR
>  
>   QUERYMAP
>     STYLE hilite
>     STATUS on
>     COLOR 255 255 0
>   END   #QUERYMAP
>  
>   LAYER  #Kotamadya
>     TRANSPARENCY 100
>     NAME 'Kotamadya'
>     METADATA
>       gix_layername        "Kotamadya"
>       RESULT_FIELDS      
> "AREA|PERIMETER|KELURAHAN|KECAMATAN|KABUPATEN|PROPINSI"
>       gix_layerfieldalias  
> "Area|Perimeter|Kelurahan|Kecamatan|Kabupaten|Propinsi"
>     END  #METADATA
>     TOLERANCE 3
>     TOLERANCEUNITS pixels
>     DATA 'kotamadya.shp'
>     HEADER 'header.html'
>     FOOTER 'footer.html'
>     LABELCACHE on
> #    TILEINDEX ''
> #    TILEITEM  ''
>     STATUS on
>     DEBUG false
>     TRANSFORM true
>     TYPE polygon
>     CLASSITEM 'KECAMATAN'
>     CLASS
>       NAME 'DANUREJAN'
>       TEMPLATE 'template.html'
>       EXPRESSION 'DANUREJAN'
>       #RASTERFILL_STYLE_SOLID
>       STYLE
>         COLOR 248 195 254
>         BACKGROUNDCOLOR 255 255 255
>       END  #STYLE
>     END #CLASS
>     CLASS
>       NAME 'GEDONGTENGEN'
>       TEMPLATE 'template.html'
>       EXPRESSION 'GEDONGTENGEN'
>       #RASTERFILL_STYLE_SOLID
>       STYLE
>         COLOR 105 254 254
>         BACKGROUNDCOLOR 255 255 255
>       END  #STYLE
>     END #CLASS
>     CLASS
>       NAME 'GONDOKUSUMAN'
>       TEMPLATE 'template.html'
>       EXPRESSION 'GONDOKUSUMAN'
>       #RASTERFILL_STYLE_SOLID
>       STYLE
>         COLOR 210 210 254
>         BACKGROUNDCOLOR 255 255 255
>       END  #STYLE
>     END #CLASS
>     CLASS
>       NAME 'GONDOMANAN'
>       TEMPLATE 'template.html'
>       EXPRESSION 'GONDOMANAN'
>       #RASTERFILL_STYLE_SOLID
>       STYLE
>         COLOR 105 254 209
>         BACKGROUNDCOLOR 255 255 255
>       END  #STYLE
>     END #CLASS
>     CLASS
>       NAME 'JETIS'
>       TEMPLATE 'template.html'
>       EXPRESSION 'JETIS'
>       #RASTERFILL_STYLE_SOLID
>       STYLE
>         COLOR 247 165 254
>         BACKGROUNDCOLOR 255 255 255
>       END  #STYLE
>     END #CLASS
>     CLASS
>       NAME 'KOTAGEDE'
>       TEMPLATE 'template.html'
>       EXPRESSION 'KOTAGEDE'
>       #RASTERFILL_STYLE_SOLID
>       STYLE
>         COLOR 165 166 254
>         BACKGROUNDCOLOR 255 255 255
>       END  #STYLE
>     END #CLASS
>     CLASS
>       NAME 'KRATON'
>       TEMPLATE 'template.html'
>       EXPRESSION 'KRATON'
>       #RASTERFILL_STYLE_SOLID
>       STYLE
>         COLOR 0 234 163
>         BACKGROUNDCOLOR 255 255 255
>       END  #STYLE
>     END #CLASS
>     CLASS
>       NAME 'MANTRIJERON'
>       TEMPLATE 'template.html'
>       EXPRESSION 'MANTRIJERON'
>       #RASTERFILL_STYLE_SOLID
>       STYLE
>         COLOR 0 194 194
>         BACKGROUNDCOLOR 255 255 255
>       END  #STYLE
>     END #CLASS
>     CLASS
>       NAME 'MERGANGSAN'
>       TEMPLATE 'template.html'
>       EXPRESSION 'MERGANGSAN'
>       #RASTERFILL_STYLE_SOLID
>       STYLE
>         COLOR 238 172 206
>         BACKGROUNDCOLOR 255 255 255
>       END  #STYLE
>     END #CLASS
>     CLASS
>       NAME 'NGAMPILAN'
>       TEMPLATE 'template.html'
>       EXPRESSION 'NGAMPILAN'
>       #RASTERFILL_STYLE_SOLID
>       STYLE
>         COLOR 175 254 221
>         BACKGROUNDCOLOR 255 255 255
>       END  #STYLE
>     END #CLASS
>     CLASS
>       NAME 'PAKUALAMAN'
>       TEMPLATE 'template.html'
>       EXPRESSION 'PAKUALAMAN'
>       #RASTERFILL_STYLE_SOLID
>       STYLE
>         COLOR 210 254 254
>         BACKGROUNDCOLOR 255 255 255
>       END  #STYLE
>     END #CLASS
>     CLASS
>       NAME 'TEGALREJO'
>       TEMPLATE 'template.html'
>       EXPRESSION 'TEGALREJO'
>       #RASTERFILL_STYLE_SOLID
>       STYLE
>         COLOR 175 221 254
>         BACKGROUNDCOLOR 255 255 255
>       END  #STYLE
>     END #CLASS
>     CLASS
>       NAME 'UMBULHARJO'
>       TEMPLATE 'template.html'
>       EXPRESSION 'UMBULHARJO'
>       #RASTERFILL_STYLE_SOLID
>       STYLE
>         COLOR 228 254 180
>         BACKGROUNDCOLOR 255 255 255
>       END  #STYLE
>     END #CLASS
>     CLASS
>       NAME 'WIROBRAJAN'
>       TEMPLATE 'template.html'
>       EXPRESSION 'WIROBRAJAN'
>       #RASTERFILL_STYLE_SOLID
>       STYLE
>         COLOR 248 195 254
>         BACKGROUNDCOLOR 255 255 255
>       END  #STYLE
>     END #CLASS
>   END  #LAYER
>  
>   LAYER  #Batas_kelurahan
>     TRANSPARENCY 100
>     NAME 'Batas_kelurahan'
>     METADATA
>       gix_layername        "Batas_kelurahan"
>       RESULT_FIELDS       "ID"
>       gix_layerfieldalias  "Id"
>     END  #METADATA
>     TOLERANCE 3
>     TOLERANCEUNITS pixels
>     DATA 'batas_kelurahan.shp'
>     HEADER 'header.html'
>     FOOTER 'footer.html'
>     LABELCACHE on
> #    TILEINDEX ''
> #    TILEITEM  ''
>     STATUS off
>     DEBUG false
>     TRANSFORM true
>     TYPE line
>     CLASS
>       NAME 'Batas_kelurahan'
>       TEMPLATE 'template.html'
>       #PEN
>       STYLE
>         SYMBOL 'Batas_kelurahan--0--0'
>         SIZE 1
>         COLOR 0 0 0
>       END  #STYLE
>     END #CLASS
>   END  #LAYER
>  
>   LAYER  #Sungai
>     TRANSPARENCY 100
>     NAME 'Sungai'
>     METADATA
>       gix_layername        "Sungai"
>       RESULT_FIELDS      
> "FNODE_|TNODE_|LPOLY_|RPOLY_|LENGTH|SUNGAI_|SUNGAI_ID"
>       gix_layerfieldalias  
> "Fnode_|Tnode_|Lpoly_|Rpoly_|Length|Sungai_|Sungai_id"
>     END  #METADATA
>     TOLERANCE 3
>     TOLERANCEUNITS pixels
>     DATA 'sungai.shp'
>     HEADER 'header.html'
>     FOOTER 'footer.html'
>     LABELCACHE on
> #    TILEINDEX ''
> #    TILEITEM  ''
>     STATUS off
>     DEBUG false
>     TRANSFORM true
>     TYPE line
>     CLASS
>       NAME 'Sungai'
>       TEMPLATE 'template.html'
>       ##PEN: COMPOSITEMARKER(2)
>       #VectorPenHollow
>       STYLE
>         SYMBOL 'Sungai--0--0'
>         SIZE 8.9
>         COLOR 0 255 255
>       END  #STYLE
>       #PEN
>       STYLE
>         SYMBOL 'Sungai--0--1'
>         SIZE 1
>         COLOR 0 255 255
>       END  #STYLE
>     END #CLASS
>   END  #LAYER
>  
>   LAYER  #Rel_ka
>     TRANSPARENCY 100
>     NAME 'Rel_ka'
>     METADATA
>       gix_layername        "Rel_ka"
>       RESULT_FIELDS      "ENTITY|LAYER"
>       gix_layerfieldalias  "Entity|Layer"
>     END  #METADATA
>     TOLERANCE 3
>     TOLERANCEUNITS pixels
>     DATA 'rel_ka.shp'
>     HEADER 'header.html'
>     FOOTER 'footer.html'
>     LABELCACHE on
> #    TILEINDEX ''
> #    TILEITEM  ''
>     STATUS off
>     DEBUG false
>     TRANSFORM true
>     TYPE line
>     CLASS
>       NAME 'Rel_ka'
>       TEMPLATE 'template.html'
>       ##PEN: COMPOSITEMARKER(2)
>       #PEN
>       STYLE
>         SYMBOL 'Rel_ka--0--0'
>         SIZE 1
>         COLOR 0 0 0
>       END  #STYLE
>       #VectorPenHash
>       STYLE
>         SYMBOL 'Rel_ka--0--1'
>         SIZE 15
>         COLOR 0 0 0
>       END  #STYLE
>     END #CLASS
>   END  #LAYER
>  
>   LAYER  #Ring_road
>     TRANSPARENCY 100
>     NAME 'Ring_road'
>     METADATA
>       gix_layername        "Ring_road"
>       RESULT_FIELDS      "ID"
>       gix_layerfieldalias  "Id"
>     END  #METADATA
>     TOLERANCE 3
>     TOLERANCEUNITS pixels
>     DATA 'ring_road.shp'
>     HEADER 'header.html'
>     FOOTER 'footer.html'
>     LABELCACHE on
> #    TILEINDEX ''
> #    TILEITEM  ''
>     STATUS on
>     DEBUG false
>     TRANSFORM true
>     TYPE line
>     CLASS
>       NAME 'Ring_road'
>       TEMPLATE 'template.html'
>       #PEN
>       STYLE
>         SYMBOL 'Ring_road--0--0'
>         SIZE 3
>         COLOR 255 195 195
>       END  #STYLE
>     END #CLASS
>   END  #LAYER
>  
>   LAYER  #Jalan_arteri
>     TRANSPARENCY 100
>     NAME 'Jalan_arteri'
>     METADATA
>       gix_layername        "Jalan_arteri"
>       RESULT_FIELDS      
> "LENGTH|X1|Y1|X2|Y2|FNODE_|TNODE_|LPOLY_|RPOLY_|JALAN_|JALAN_ID|KETERANGAN|NAMA_JALAN"
>       gix_layerfieldalias  
> "Length|X1|Y1|X2|Y2|Fnode_|Tnode_|Lpoly_|Rpoly_|Jalan_|Jalan_id|Keterangan|Nama_jalan"
>     END  #METADATA
>     TOLERANCE 3
>     TOLERANCEUNITS pixels
>     DATA 'jalan_arteri.shp'
>     HEADER 'header.html'
>     FOOTER 'footer.html'
>     LABELCACHE on
> #    TILEINDEX ''
> #    TILEITEM  ''
>     STATUS on
>     DEBUG false
>     TRANSFORM true
>     TYPE line
>     CLASS
>       NAME 'Jalan_arteri'
>       TEMPLATE 'template.html'
>       #PEN
>       STYLE
>         SYMBOL 'Jalan_arteri--0--0'
>         SIZE 2
>         COLOR 255 0 0
>       END  #STYLE
>     END #CLASS
>   END  #LAYER
>  
>   LAYER  #Jalan
>     TRANSPARENCY 100
>     NAME 'Jalan'
>     METADATA
>       gix_layername        "Jalan"
>       RESULT_FIELDS      
> "LENGTH|X1|Y1|X2|Y2|FNODE_|TNODE_|LPOLY_|RPOLY_|JALAN_|JALAN_ID|KETERANGAN|NAMA_JALAN"
>       gix_layerfieldalias  
> "Length|X1|Y1|X2|Y2|Fnode_|Tnode_|Lpoly_|Rpoly_|Jalan_|Jalan_id|Keterangan|Nama_jalan"
>     END  #METADATA
>     TOLERANCE 3
>     TOLERANCEUNITS pixels
>     DATA 'jalan.shp'
>     HEADER 'header.html'
>     FOOTER 'footer.html'
>     LABELCACHE on
> #    TILEINDEX ''
> #    TILEITEM  ''
>     STATUS on
>     DEBUG false
>     TRANSFORM true
>     TYPE line
>     CLASS
>       NAME 'Jalan'
>       TEMPLATE 'template.html'
>       #PEN
>       STYLE
>         SYMBOL 'Jalan--0--0'
>         SIZE 1
>         COLOR 255 0 0
>       END  #STYLE
>       LABEL
>         TYPE truetype
>         COLOR 0 0 0
>         ENCODING "ISO-8859-1"
>         FONT 'Arial-Normal'
>         PARTIALS true
>         ANGLE auto
>         POSITION uc
>         SIZE 2
>         ANTIALIAS true
>         FORCE false
>       END
>     END #CLASS
>     LABELITEM 'Nama_jalan'
>   END  #LAYER
>  
>   LAYER  #Kecamatan
>     TRANSPARENCY 100
>     NAME 'Kecamatan'
>     METADATA
>       gix_layername        "Kecamatan"
>       RESULT_FIELDS      
> "IBUKOTA_|IBUKOTA_ID|KETERANGAN|NAMA|X_COORD|Y_COORD"
>       gix_layerfieldalias  
> "Ibukota_|Ibukota_id|Keterangan|Nama|X_coord|Y_coord"
>     END  #METADATA
>     TOLERANCE 3
>     TOLERANCEUNITS pixels
>     DATA 'kecamatan.shp'
>     HEADER 'header.html'
>     FOOTER 'footer.html'
>     LABELCACHE on
> #    TILEINDEX ''
> #    TILEITEM  ''
>     STATUS off
>     DEBUG false
>     TRANSFORM true
>     TYPE point
>     CLASS
>       NAME 'Kecamatan'
>       TEMPLATE 'template.html'
>       #BASICMARKER_STYLE_PATTERN
>       STYLE
>         SYMBOL 'Kecamatan--0--0'
>         SIZE 8
>         COLOR 0 0 0
>         BACKGROUNDCOLOR -1 -1 -1
>       END  #STYLE
>       LABEL
>         TYPE truetype
>         COLOR 0 0 0
>         ENCODING "ISO-8859-1"
>         FONT 'Arial-Normal'
>         PARTIALS true
>         POSITION cr
>         SIZE 6
>         ANTIALIAS true
>         FORCE false
>       END
>     END #CLASS
>     LABELITEM 'Nama'
>   END  #LAYER
>  
>   LAYER  #Fasilitas_umum
>     TRANSPARENCY 100
>     NAME 'Fasilitas_umum'
>     METADATA
>       gix_layername        "Fasilitas_umum"
>       RESULT_FIELDS      "ID|KETERANGAN|X_COORD|Y_COORD"
>       gix_layerfieldalias  "Id|Keterangan|X_coord|Y_coord"
>     END  #METADATA
>     TOLERANCE 3
>     TOLERANCEUNITS pixels
>     DATA 'fasilitas_umum.shp'
>     HEADER 'header.html'
>     FOOTER 'footer.html'
>     LABELCACHE on
> #    TILEINDEX ''
> #    TILEITEM  ''
>     STATUS off
>     DEBUG false
>     TRANSFORM true
>     TYPE point
>     CLASS
>       NAME 'Fasilitas_umum'
>       TEMPLATE 'template.html'
>       #BASICMARKER_STYLE_PATTERN
>       STYLE
>         SYMBOL 'Fasilitas_umum--0--0'
>         SIZE 8
>         COLOR 255 0 0
>         BACKGROUNDCOLOR -1 -1 -1
>       END  #STYLE
>     END #CLASS
>   END  #LAYER
>  
> OUTPUTFORMAT
>   NAME gif
>   DRIVER "GD/GIF"
>   MIMETYPE "image/gif"
>   IMAGEMODE PC256
>   EXTENSION "gif"
>   TRANSPARENT on
> END  #OUTPUTFORMAT
>  
> END  #MAP
>  




More information about the MS4W-Users mailing list