Hi Fabio
you can not use layer name with space: sfondo mare
 
eventuall you can try to enclose it between " sfondo mare" though im not certain this works.
but i would advice using underscore sfondo_mare
and use the gettext translation system if you want to see sfondo mare and not sfondo_mare in the interface
 
Regards
Oliber
----- Original Message -----
Sent: Wednesday, May 24, 2006 11:37 AM
Subject: [Cartoweb-users] EROOR in getLayerByName

This is the map file :

MAP
  NAME "Test"
  EXTENT 16 41 17 42
  IMAGETYPE PNG
  IMAGECOLOR 255 255 255
  STATUS ON
  UNITS DD
  FONTSET "fonts_bari.txt"
  SYMBOLSET "symbols.sym"
  SHAPEPATH "data"

  OUTPUTFORMAT
    NAME png
    DRIVER "GD/PNG"
    MIMETYPE "image/png"
    IMAGEMODE PC256
    EXTENSION "png"
    FORMATOPTION "INTERLACE=OFF"
    TRANSPARENT OFF
  END
  OUTPUTFORMAT
    NAME jpeg
    DRIVER "GD/JPEG"
    MIMETYPE "image/jpeg"
    IMAGEMODE RGB
    EXTENSION "jpg"
    FORMATOPTION "INTERLACE=OFF"
    FORMATOPTION "QUALITY=80"
  END
  REFERENCE
    IMAGE images/keymap_bari.png
    EXTENT -168827.05 1620431 1414509.05 2677441
    STATUS ON
    COLOR -1 -1 -1
    OUTLINECOLOR 200 0 0
    SIZE 224 150
  END

  SCALEBAR
    POSTLABELCACHE TRUE
    STYLE 0
    UNITS kilometers
    SIZE 350 3
    TRANSPARENT TRUE
    COLOR 77 77 88
    IMAGECOLOR 242 255 195
    BACKGROUNDCOLOR 222 222 222
    LABEL
      TYPE BITMAP
      SIZE SMALL
      COLOR 0 0 0
      POSITION UR
      BUFFER 10
    END
  END

  LEGEND
    KEYSIZE 20 15
  END

  ##########
  # LAYERS #
  ##########
 
  # add your layers definitions here
  LAYER
    NAME "sfondo mare"
    DATA "bafg_Mare.shp"
    TYPE POLYGON
    CLASS
      NAME "sfodo mare"
      COLOR 156 203 255
      BACKGROUNDCOLOR 156 203 255
    END
  END


This is the layers.ini file :
; whether to generate class icons automatically
autoClassLegend = true

; layers

layers.root.className = LayerGroup
layers.root.children =  sfondo mare

layers.edit_poly.className = Layer
layers.edit_poly.label = sfondo mare
layers.edit_poly.msLayer = sfondo mare


Why I have this ERROR ???

class:   CartoclientException
message:   unknown layer name: sfondo mare
Backtrace:

file: 884 - c:\Inetpub\wwwroot\cartoweb3\coreplugins\layers\client\ClientLayers.php
call: ClientLayers->getLayerByName("sfondo mare")

file: 909 - c:\Inetpub\wwwroot\cartoweb3\coreplugins\layers\client\ClientLayers.php
call: ClientLayers->getLayersMask("sfondo mare", False)

file: 920 - c:\Inetpub\wwwroot\cartoweb3\coreplugins\layers\client\ClientLayers.php
call: ClientLayers->getLayersMask("root", False)

file: 227 - c:\Inetpub\wwwroot\cartoweb3\client\ClientPluginHelper.php
call: ClientLayers->buildRequest()

file: UNKNOWN - UNKNOWN
call: ServerCallerHelper->buildRequestHelper(Object(ClientLayers), Object(MapRequest))

file: 267 - c:\Inetpub\wwwroot\cartoweb3\common\PluginManager.php
call: call_user_func_array(Array(2), Array(2))

file: 285 - c:\Inetpub\wwwroot\cartoweb3\common\PluginManager.php
call: PluginManager->callPluginImplementing(Object(ClientLayers), "ServerCaller", "buildRequest", Array(1))

file: 574 - c:\Inetpub\wwwroot\cartoweb3\client\Cartoclient.php
call: PluginManager->callPluginsImplementing("ServerCaller", "buildRequest", Array(1))

file: 881 - c:\Inetpub\wwwroot\cartoweb3\client\Cartoclient.php
call: Cartoclient->callPluginsImplementing("ServerCaller", "buildRequest", Object(MapRequest))

file: 1027 - c:\Inetpub\wwwroot\cartoweb3\client\Cartoclient.php
call: Cartoclient->doMain()

file: 38 - c:\Inetpub\wwwroot\cartoweb3\htdocs\client.php
call: Cartoclient->main()


********************************************************************************************
graphic

Eng. Fabio D'Ovidio
WebGIS Staff
Planetek Italia Srl
via Massaua, 12 - 70123 Bari - Italy
web : http ://www.planetek.it
e-mail : [EMAIL PROTECTED]

********************************************************************************************


_______________________________________________
Cartoweb-users mailing list
[email protected]
http://lists.maptools.org/mailman/listinfo/cartoweb-users
_______________________________________________
Cartoweb-users mailing list
[email protected]
http://lists.maptools.org/mailman/listinfo/cartoweb-users

Reply via email to