Cómo añadir información

Another Way To Create Layers

    Tabla de contenidos
    1. 1. Topics in this section

    The method described in the previous section is easy to use, but requires a layer definition be created first through the Infrastructure Studio UI. An alternative approach is to use the methods defined in

    WebServerExtensions\www\mapviewerphp\layerdefinitionfactory.php.

    This file contains several functions, which can be used to build up a layer definition. The parameters of these functions enable you to set the most commonly used settings. (If you need to change other settings, you will have to either use the Infrastructure Studio UI, or modify the XML of the layer definition.)

    The layerdefinitionfactory is only available for PHP. For development using ASP.NET, a good alternative is to use the Visual Studio tool xsd.exe to generate .NET classes for the LayerDefinition schema.

    Function Parameter Description
    CreateLayerDefinition()$resourceIdThe repository path of the feature source for the layer. For example: Library://Samples/Sheboygan/Data/Par....FeatureSource. Equivalent to the Data resource used in this layer field in Infrastructure Studio’s layer editor.
    $featureClassThe feature class to use. For example, SHP_Schema:Parcels. Equivalent to the Feature class field in Infrastructure Studio’s layer editor.
    $geometryThe geometry to use from the feature class. For example, SHPGEOM. Equivalent to the Geometry field in Infrastructure Studio’s layer editor.
    $featureClassRangeA scale range created by filling in a scale range template (ScaleRange.templ).
    CreateScaleRange()$minScaleThe minimum scale range to which this rule applies. Equivalent to the From field in Infrastructure Studio’s layer editor.
    $maxScaleThe maximum scale range to which this rule applies. Equivalent to the To field in Infrastructure Studio’s layer editor.
    $typeStyleA type style created by using CreateAreaTypeStyle(), CreateLineTypeStyle() or CreatePointTypeStyle().
    CreateAreaTypeStyle()$areaRulesOne or more area rules, created by CreateAreaRule.
    CreateAreaRule()$legendLabelThe text for the label shown beside this rule in the legend. Equivalent to the Legend Label field in Infrastructure Studio’s layer editor.
    $filterTextThe filter expression that determines which features match this rule. For example, SQFT >= 1 AND SQFT < 800. Equivalent to the Condition field in Infrastructure Studio’s layer editor.
    $foreGroundColorThe color to be applied to areas that match this rule. Equivalent to the Foreground color field in Infrastructure Studio’s layer editor.
    CreateTextSymbol()$textThe string for the text.
    $fontHeightThe height for the font.
    $foregroundColorThe foreground color.
    CreatePointTypeStyle()$pointRule One or more point rules, created by CreatePointRule().
    CreatePointRule()$legendLabelThe label shown beside this rule in the legend. Equivalent to the Legend label field in Infrastructure Studio’s layer editor.
      $filterThe filter expression that determines which features match this rule. Equivalent to the Condition field in Infrastructure Studio’s layer editor.
      $labelThe text symbol, created by CreateTextSymbol().
      $pointSymA mark symbol created by CreateMarkSymbol().
    CreateMarkSymbol()$resourceIdThe resource ID of the symbol used to mark each point. For example, library://Samples/Sheboygan/Symbols/....SymbolLibrary. Equivalent to the Location field in the Select a symbol from a Symbol Library dialog in Infrastructure Studio’s layer editor.
    $symbolNameThe name of the desired symbol in the symbol library.
    $widthThe width of the symbol (in points). Equivalent to the Width field in the Style Point dialog in Infrastructure Studio’s layer editor.
    $heightThe height of the symbol (in points). Equivalent to the Height field in the Style Point dialog in Infrastructure Studio’s layer editor.
    $colorThe color for the symbol. Equivalent to the Foreground color field in the Style Point dialog in Infrastructure Studio’s layer editor.
    CreateLineTypeStyle()$lineRulesOne or more line rules, created by CreateLineRule().
    CreateLineRule()$colorThe color to be applied to lines that match this rule. Equivalent to the Color field in Infrastructure Studio’s layer editor.
    $legendLabelThe label shown beside this rule in the legend. Equivalent to the Legend Label field in Infrastructure Studio’s layer editor.
    $filterThe filter expression that determines which features match this rule. Equivalent to the Condition field in Infrastructure Studio’s layer editor.

    For more information on these settings, see the Studio Help.