[Gfoss] problema cartella temporanea P.Mappre

Gianpaolo Romeo gianpaolo.romeo a gmail.com
Gio 30 Dic 2010 11:46:00 CET


Salve, sto usando P.Mapper 4.1.1, ho configurato un mio file .map,
il config_default.xml, ma proprio non c'è modo di far comparire la mappa (si
apre la pagina e la scritta "loading" continua a frullare...
ho provato a utilizzare i dati demo scaricati dal sito, ma accade sempre la
stessa cosa: credo sia un problema di cartella temporanea (IMAGEPATH
"/ms4w/Apache/htdocs/tmp/ms_tmp/" e IMAGEURL "/ms_tmp/") che non viene
riconosciuta da P.Mapper.
se apro dal browser l'url
http://localhost/tmp/ms_tmp/<http://localhost/ms_tmp/>,
questa è accessibile, ma dentro non viene copiata nessuna immagine
temporanea (ed ovviamente non viene visualizzata sulla mappa).
ho provato a scrivere l'imagepath con lo slash od il backslash, assoluto e
con il nome del volume (e:\), ma proprio non c'è verso di schiodare quella
scritta "loading".
vi incollo il file .map e l'xml (quelli del demo_data)sperando di cavarci
fuori qualcosa.


grazie in anticipo.

Gianpaolo.




*pmapper_demo.map*

################################################################################################
# Adapt settings in map file <tt>pmapper_demo.map</tt> for the following
tags to match settings
# on your machine (see additionally MapServer documentation for detailed
information):
#
#  MAP
#    SHAPEPATH
#    FONTSET
#    SYMBOLSET
#
#  WEB
#    IMAGEPATH
#    IMAGEURL
#
##################################################################################################

#
# Start of map file
#
MAP
EXTENT  1988372 1400000 6411627 5400000

UNITS meters
#EXTENT -15 30 40 70
#UNITS dd
SIZE 600 500
SHAPEPATH "../../pmapper_demodata"
SYMBOLSET "../common/symbols/symbols-pmapper.sym"
FONTSET "../common/fonts/msfontset.txt"
RESOLUTION 96
IMAGETYPE png
INTERLACE OFF
#CONFIG "PROJ_LIB" "C:/proj/nad/"
PROJECTION
  # ETRS-LAEA
  #"init=epsg:3035"
  "+proj=laea +lat_0=52 +lon_0=10 +x_0=4321000 +y_0=3210000 +ellps=GRS80
+units=m +no_defs  no_defs"
END


#
# Image formates for GD
#
OUTPUTFORMAT
  NAME "png"
  DRIVER "GD/PNG"
  MIMETYPE "image/png"
  IMAGEMODE RGB
  FORMATOPTION  INTERLACE=OFF
  TRANSPARENT OFF
  EXTENSION "png"
END

OUTPUTFORMAT
  NAME "png8"
  DRIVER "GD/PNG"
  MIMETYPE "image/png"
  IMAGEMODE PC256
  FORMATOPTION  INTERLACE=OFF
  TRANSPARENT OFF
  EXTENSION "png"
END

OUTPUTFORMAT
  NAME "jpeg"
  DRIVER "GD/JPEG"
  MIMETYPE "image/jpeg"
  IMAGEMODE RGB
  FORMATOPTION "QUALITY=70"
  EXTENSION "jpg"
END

#
# Image formats for AGG
#
# OUTPUTFORMAT   ### 24 bit PNG
  # NAME 'agg_png'
  # DRIVER AGG/PNG
  # IMAGEMODE RGB
# END

# OUTPUTFORMAT  ### 32 bit PNG with alpha channel from transparency
  # NAME 'agg_pnga'
  # DRIVER AGG/PNG
  # IMAGEMODE RGBA
# END

# OUTPUTFORMAT  ### 8 bit PNG
  # NAME 'agg_png8'
  # DRIVER AGG/PNG
  # IMAGEMODE RGB
  # FORMATOPTION "QUANTIZE_FORCE=ON"
  # FORMATOPTION "QUANTIZE_DITHER=OFF"
  # FORMATOPTION "QUANTIZE_COLORS=256"
# END

# OUTPUTFORMAT
  # NAME 'agg_jpeg'
  # DRIVER AGG/JPEG
  # IMAGEMODE RGB
# END


OUTPUTFORMAT
  NAME GTiff
  DRIVER "GDAL/GTiff"
  MIMETYPE "image/tiff"
  IMAGEMODE RGB
  #FORMATOPTION "TFW=YES"
  #FORMATOPTION "COMPRESS=PACKBITS"
  EXTENSION "tif"
END

OUTPUTFORMAT
  NAME imagemap
  MIMETYPE "text/html"
  FORMATOPTION SKIPENDTAG=OFF
  DRIVER imagemap
END

#
# Start of web interface definition
#
WEB
  TEMPLATE "map.html"
  IMAGEPATH "/ms4w/Apache/htdocs/tmp/ms_tmp/"
  IMAGEURL "/tmp/ms_tmp/"
  METADATA
    #"MAPFILE_ENCODING" "ISO-8859-1"
    #"ows_title"     "WMS Demo Server"
    #"ows_onlineresource" "http://wms.yourserver.org?owskey=test&"
    #"ows_srs"       "EPSG:3035 EPSG:4326"
  END  # Metadata
END  # Web

#
# Start of Reference map definition
#
REFERENCE
  EXTENT 1496247 1332616 7055632 5502154 #2200000 1400000 8000000 5400000
  IMAGE "../../images/reference.png"
  SIZE 199 149
  COLOR -1 -1 -1
  OUTLINECOLOR 255 0 0
END  # Reference

LEGEND
END

#
# Start of ScaleBar definition
#
SCALEBAR
  STATUS off
  TRANSPARENT off
  INTERVALS 4
  SIZE 200 3
  UNITS kilometers
  COLOR 250 250 250
  OUTLINECOLOR 0 0 0
  BACKGROUNDCOLOR 100 100 100
  STYLE 0
  POSTLABELCACHE true
  LABEL
    COLOR 0 0 90
    #OUTLINECOLOR 200 200 200
    SIZE small
  END  # Label
END  # Reference



# SYMBOLS USED IN PMAPPER
# - 'circle' always necessary (used e.g. for highlight)
# - 'square' used in currecnt map file
# Symbols can also be defined via tag SYMBOLSET (see above)
Symbol
  Name 'circle'
  Type ELLIPSE
  Filled TRUE
  Points
    1 1
  END
END

Symbol
  Name 'square'
  Type VECTOR
  Filled TRUE
  Points
    0 1
    0 0
    1 0
    1 1
    0 1
  END
END


#================== START OF LAYER SECTION =====================#


LAYER
  NAME "jpl_wms_global_mosaic"
  TYPE RASTER
  STATUS OFF
  CONNECTION "http://wms.jpl.nasa.gov/wms.cgi?"
  CONNECTIONTYPE WMS
  PROJECTION
    #"init=epsg:4326"
    "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs  no_defs"
  END
  METADATA
    "DESCRIPTION"         "JPL Global Mosaic (WMS)"
    "wms_name"            "global_mosaic_base"
    "wms_style"           "visual"
    "wms_server_version"  "1.1.1"
    "wms_format"          "image/jpeg"
    "ows_title"           "jpl_wms_global_mosaic"
  END
END



#
# LAYER DGM
#
LAYER
  NAME "dem"
  TYPE Raster
  STATUS OFF
  DATA 'europa_dem.jpg'
  MINSCALE 3000000
  PROJECTION
    #"init=epsg:4326"
    "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs  no_defs"
  END
  METADATA
    "DESCRIPTION"   "NGDC Shaded  relief"
    "LEGENDICON"    "images/legend/dem.png"
    "ows_title"     "dem"
  END
END




#
# Start of Layer Countries.shp
#
LAYER
  NAME "countries"
  TYPE polygon
  DATA "countries"
  TRANSPARENCY 30
  TEMPLATE void
  PROJECTION
    #"init=epsg:4326"
    "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs  no_defs"
  END
  METADATA
    "DESCRIPTION" "Countries"
    ## ADAPTED TO MULTILINGUAL SHAPEFILE
    "RESULT_FIELDS" "ISOCODE, a default:NAME_EN a de:NAME_DE a it:NAME_IT a fr
:NAME_FR a br:NAME_BR a es:NAME_ES, a default:CAPITAL_EN a de:CAPITAL_DE a it
:CAPITAL_IT a fr:CAPITAL_FR a br:CAPITAL_BR a es:CAPITAL_ES,AREA_KM2,POPULATION"
    "RESULT_HEADERS" "ISO Code,Name,Capital,Area,Population"
    "ows_title"      "countries"
  END  # Metadata
  CLASS
    Name 'Countries'
    COLOR 200 254 199
    OUTLINECOLOR 0 0 0
  END  # Class
END  # Layer



LAYER
  NAME "cities10000eu"
  TYPE point
  DATA "cities10000eu"
  TOLERANCE 6
  TOLERANCEUNITS pixels
  LABELITEM "NAME"
  LABELMAXSCALE 8000000
  TEMPLATE void
  PROJECTION
    #"init=epsg:4326"
    "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs  no_defs"
  END
  METADATA
    "DESCRIPTION" "Cities"
    "RESULT_FIELDS" "NAME, ISO2_CODE, POPULATION, GTOPO30"
    "RESULT_HEADERS" "Name,Country,Inhabitants,Altitude"
    "RESULT_HYPERLINK" "NAME"
    "LAYER_ENCODING" "UTF-8"
    "ows_title"      "cities1000"
  END  # Metadata

  CLASS
    NAME "> 1'000'000"
    EXPRESSION ([POPULATION] > 1000000)
    COLOR 255 0 0
    OUTLINECOLOR 0 0 0
    SYMBOL 'square'
    SIZE 9
    LABEL
      POSITION Auto
      COLOR 0 0 150
      BACKGROUNDCOLOR 255 255 128
      BACKGROUNDSHADOWCOLOR 150 150 150
      BACKGROUNDSHADOWSIZE 2 2
      BUFFER 2
      TYPE truetype
      ENCODING "UTF-8"
      FONT FreeSans
      SIZE 8
      MAXSIZE 9
      #SIZE small
    END #Label
  END  # Class
  CLASS
    NAME "500'000 - 1'000'000"
    EXPRESSION ([POPULATION] <= 1000000 AND [POPULATION] > 500000)
    COLOR 255 0 0
    SYMBOL 'circle'
    SIZE 8
    LABEL
      POSITION Auto
      COLOR 0 0 150
      BACKGROUNDCOLOR 255 255 128
      BACKGROUNDSHADOWCOLOR 150 150 150
      BACKGROUNDSHADOWSIZE 2 2
      BUFFER 2
      TYPE truetype
      ENCODING "UTF-8"
      FONT FreeSans
      SIZE 8
      MAXSIZE 9
      #SIZE small
    END #Label
  END  # Class
  CLASS
    NAME "100'000 - 500'000"
    EXPRESSION ([POPULATION] <= 500000 AND [POPULATION] > 100000)
    COLOR 255 0 0
    SYMBOL 'square'
    SIZE 5
  END  # Class
  CLASS
    NAME "50'000 - 100'000"
    EXPRESSION ([POPULATION] <= 100000 AND [POPULATION] > 50000)
    COLOR 0 0 0
    SYMBOL 'square'
    SIZE 4
    #MAXSCALE 20000000
  END  # Class
  CLASS
    NAME "10'000 - 50'000"
    EXPRESSION ([POPULATION] <= 50000 AND [POPULATION] > 10000)
    COLOR 100 100 100
    SYMBOL 'circle'
    SIZE 3
    #MAXSCALE 10000000
  END  # Class

END  # Layer


#
# Start of Layer Rivers.shp
#
LAYER
  NAME "rivers"
  TYPE line
  DATA "rivers"
  TOLERANCE 3
  TOLERANCEUNITS pixels
  TEMPLATE void
  PROJECTION
    #"init=epsg:4326"
    "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs  no_defs"
  END
  METADATA
    "DESCRIPTION" "Rivers"
    "RESULT_FIELDS" "NAME"
    "RESULT_HEADERS" "Name"
    "ows_title"      "cities"
  END  # Metadata
  CLASS
    Name 'Rivers'
    COLOR 0 0 255
  END  # Class
END  # Layer




END  #Map



*config_default.xml*

<pmapper>
    <ini>
        <pmapper>
            <pmTitle>p.mapper - A MapServer PHP/MapScript
Framework</pmTitle>
            <pmHeading>MapServer PHP/MapScript Framework, v4.1.1</pmHeading>
            <pmLogoSrc>images/logos/logo-black.png</pmLogoSrc>
            <pmLogoTitle>p.mapper homepage</pmLogoTitle>
            <pmLogoUrl>http://www.pmapper.net</pmLogoUrl>

            <debugLevel>3</debugLevel>
            <plugins>export</plugins>
            <plugins>scalebar</plugins>
            <plugins>transparency</plugins>
        </pmapper>
        <config>
            <pm_config_location>default</pm_config_location>
            <pm_javascript_location>javascript/src</pm_javascript_location>
            <pm_print_configfile>common/print.xml</pm_print_configfile>
            <pm_search_configfile>inline</pm_search_configfile>
        </config>
        <map>
            <mapFile>pmapper_demo.map</mapFile>
            <tplMapFile>common/template.map</tplMapFile>
            <categories>
                <category name="cat_admin">
                    <group>countries</group>
                    <group>cities10000eu</group>
                </category>
                <category name="cat_nature">
                    <group>rivers</group>
                </category>
                <category name="cat_raster">
                    <group>dem</group>
                    <group>jpl_wms_global_mosaic</group>
                </category>
            </categories>
            <allGroups>
                <group>countries</group>
                <group>cities10000eu</group>
                <group>dem</group>
                <group>rivers</group>
                <group>jpl_wms_global_mosaic</group>
            </allGroups>
            <defGroups>
                <group>countries</group>
                <group>cities10000eu</group>
            </defGroups>
            <layerAutoRefresh>1</layerAutoRefresh>
            <imgFormat>png</imgFormat>
            <altImgFormat>jpeg</altImgFormat>
            <altImgFormatLayers>
                <layer>jpl_wms_global_mosaic</layer>
                <layer>dem</layer>
            </altImgFormatLayers>
            <sliderMax>max</sliderMax>
            <sliderMin>100000</sliderMin>
        </map>
        <query>
            <limitResult>300</limitResult>
            <highlightColor>0 255 255</highlightColor>
            <highlightSelected>1</highlightSelected>
            <autoZoom>nquery</autoZoom>
            <autoZoom>search</autoZoom>
            <zoomAll>search</zoomAll>
            <zoomAll>nquery</zoomAll>
            <infoWin>dynwin</infoWin>
            <alignQueryResults>1</alignQueryResults>
            <pointBuffer>10000</pointBuffer>
            <shapeQueryBuffer>0.02</shapeQueryBuffer>
        </query>
        <ui>
            <tocStyle>tree</tocStyle>
            <legendStyle>attached</legendStyle>
            <useCategories>1</useCategories>
            <catWithCheckbox>1</catWithCheckbox>
            <scaleLayers>1</scaleLayers>
            <icoW>18</icoW>
            <icoH>14</icoH>
        </ui>
        <locale>
            <defaultLanguage>en</defaultLanguage>
            <defaultCharset>UTF-8</defaultCharset>
            <map2unicode>1</map2unicode>
        </locale>
        <print>
            <printImgFormat>png</printImgFormat>
            <printAltImgFormat>jpeg</printAltImgFormat>
            <pdfres>2</pdfres>
        </print>
        <download>
            <dpiLevels>150</dpiLevels>
            <dpiLevels>200</dpiLevels>
            <dpiLevels>300</dpiLevels>
        </download>
        <php>
            <pearDbClass>MDB2</pearDbClass>
            <defaultTimeZone>Europe/Vienna</defaultTimeZone>
        </php>
        <pluginsConfig>
            <export>
                <formats>XLS</formats>
                <formats>CSV</formats>
                <formats>PDF</formats>
            </export>
        </pluginsConfig>
    </ini>



    <searchlist version="1.0">
        <dataroot>$</dataroot>
        <searchitem name="cities" description="City">
            <layer type="shape" name="cities10000eu">
                <field type="s" name="NAME" description="City"  wildcard="0"
/>
            </layer>
        </searchitem>
        <searchitem name="countries" description="Country">
            <layer type="shape" name="countries">
                <field type="s" name="ISOCODE" description="Country"
wildcard="2">
                    <definition type="options" connectiontype="ms"
sort="asc" firstoption="*">
                        <mslayer encoding="ISO-8859-1" keyfield="ISOCODE"
showfield="NAME_EN"/>
                    </definition>
                </field>
            </layer>
        </searchitem>
        <!-- Sample for suggest function -->
        <searchitem name="cities_suggest_ms" description="Cities Suggest
MS">
            <layer type="ms" name="cities10000eu">
                <field type="s" name="NAME" description="City" wildcard="2">
                    <definition type="suggest" connectiontype="ms"
minlength="1" startleft="1" sort="asc">
                        <mslayer encoding="UTF-8"/>
                    </definition>
                </field>
            </layer>
        </searchitem>
    </searchlist>


</pmapper>
-------------- parte successiva --------------
Un allegato HTML ?tato rimosso...
URL: <http://lists.gfoss.it/pipermail/gfoss/attachments/20101230/32f5d0c9/attachment-0001.htm>


Maggiori informazioni sulla lista Gfoss