0

i use mapinfo .tab for show the map, and i want to use SQl Server To select the other data, can mapserver have 2 connection in layer? or there are other ways this my .MAP layer configuration.

LAYER
    NAME layer_name
    TYPE POLYGON
    STATUS ON
    CONNECTIONTYPE OGR
    CONNECTION "./map/1172.TAB"
 >>>CONNECTION "connection sql"<<<
    DATA "select from mapinfo join to sqlserver"
    METADATA
      "wms_title" "Sabang"
    END

    PROJECTION
      "init=epsg:32646"
    END

    CLASS
        NAME "Elevation Poly 5"
        STYLE
            COLOR        232 232 232
            OUTLINECOLOR 32 32 32
          END
    END
END # Layer
1

You can't merge the two layers directly in the mapfile. Instead you can use the OGR Virtual Format to join the Mapinfo-File and the data from the SQL Server. In the Mapfile you have to use the CONNECTIONTYPE OGR and to set the CONNECTION to the file with the virtual format definition. You can find more innformation in the Mapserver documentation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.