[mapguide-users] Can't create layer using MySQL feature source

Manel Gimeno manelgimeno at gmail.com
Mon Apr 6 13:15:11 EDT 2009


Thanks Stefan.

I think the main problem is in the connection to MySQL. Even Mapguide Maestro says that there is no error reported I've tried to use the FeatureSource  to connect using MapAgent/Test connection and the test doesn't work (it return false).

Could you send me your FeatureSource XML to try to find where the problem is?

Thanks in advance
Manel Gimeno

----- Original Message ----- 
  From: Stefan Dalakov 
  To: MapGuide Users Mail List 
  Sent: Monday, April 06, 2009 4:48 PM
  Subject: Re: [mapguide-users] Can't create layer using MySQL feature source


  Hi Manel,
  Here is a layerDefinition that works for me.
  Have you specified Coordinate-System-Overrides ?

  Stefan Dalakov


  <?xml version="1.0" encoding="UTF-8" ?> 
  - <LayerDefinition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="LayerDefinition-1.1.0.xsd" version="1.1.0">
  - <VectorLayerDefinition>
    <ResourceId>Library://mysql_ds.FeatureSource</ResourceId> 
    <FeatureName>Fdotechnop_mg:links</FeatureName> 
    <FeatureNameType>FeatureClass</FeatureNameType> 
  - <PropertyMapping>
    <Name>LAYER</Name> 
    <Value>LAYER</Value> 
    </PropertyMapping>
  - <PropertyMapping>
    <Name>LENGTH</Name> 
    <Value>LENGTH</Value> 
    </PropertyMapping>
    <Geometry>ogc_geom</Geometry> 
  - <VectorScaleRange>
  - <PointTypeStyle>
    <DisplayAsText>false</DisplayAsText> 
    <AllowOverpost>false</AllowOverpost> 
  - <PointRule>
    <LegendLabel /> 
    </PointRule>
    </PointTypeStyle>
  - <LineTypeStyle>
  - <LineRule>
    <LegendLabel>'Main Pipe'</LegendLabel> 
    <Filter>"LAYER" = 'Main Pipe'</Filter> 
  - <LineSymbolization2D>
    <LineStyle>Solid</LineStyle> 
    <Thickness>2</Thickness> 
    <Color>FF000000</Color> 
    <Unit>Points</Unit> 
    <SizeContext>DeviceUnits</SizeContext> 
    </LineSymbolization2D>
    </LineRule>
  - <LineRule>
    <LegendLabel>'Pipeline'</LegendLabel> 
    <Filter>"LAYER" = 'Pipeline'</Filter> 
  - <LineSymbolization2D>
    <LineStyle>Solid</LineStyle> 
    <Thickness>2</Thickness> 
    <Color>FF000080</Color> 
    <Unit>Points</Unit> 
    <SizeContext>DeviceUnits</SizeContext> 
    </LineSymbolization2D>
    </LineRule>
  - <LineRule>
    <LegendLabel /> 
  - <LineSymbolization2D>
    <LineStyle>Solid</LineStyle> 
    <Thickness>0.0</Thickness> 
    <Color>ff000000</Color> 
    <Unit>Centimeters</Unit> 
    <SizeContext>DeviceUnits</SizeContext> 
    </LineSymbolization2D>
    </LineRule>
    </LineTypeStyle>
  - <AreaTypeStyle>
  - <AreaRule>
    <LegendLabel /> 
  - <AreaSymbolization2D>
  - <Fill>
    <FillPattern>Solid</FillPattern> 
    <ForegroundColor>ffffffff</ForegroundColor> 
    <BackgroundColor>ff000000</BackgroundColor> 
    </Fill>
  - <Stroke>
    <LineStyle>Solid</LineStyle> 
    <Thickness>0.0</Thickness> 
    <Color>ff000000</Color> 
    <Unit>Centimeters</Unit> 
    <SizeContext>DeviceUnits</SizeContext> 
    </Stroke>
    </AreaSymbolization2D>
    </AreaRule>
    </AreaTypeStyle>
    </VectorScaleRange>
    </VectorLayerDefinition>
    </LayerDefinition>


  Manel Gimeno wrote: 
    Hi all,

    I've created a MySQL FeatureSource in Mapguide 2.0 using Mapguide Maestro 1.0.9.15910. When I click in the test connection button no error is reported, so it seems the connection to MySQL works fine.

    When I try to create a FeatureLayer using the MySQL FeatureSource previously defined the following error happens after selecting the FeatureSource as resource:

    "Failed to read schema from data source.
    The operation gave the error message: Error en el servidor remoto: (559) MgConnectionFailedException.: 
    Cannot establish connection.
    Exception occurred in method MgServerDescribeSchema::ExecuteDescribeSchema() at line 173 in file d:\buildforgeprojects\mapguide_open_source_v2.0\build_23.8\mgdev\server\src\services\feature\ServerDescribeSchema.cpp"

    Can anyone help me to solve this problem? (Maybe if you have an example of XML LayerDefinition using a MySQL FeatureSource...)

    Thanks in advance
    Manel Gimeno
----------------------------------------------------------------------------
_______________________________________________
mapguide-users mailing list
mapguide-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users
  



------------------------------------------------------------------------------


  _______________________________________________
  mapguide-users mailing list
  mapguide-users at lists.osgeo.org
  http://lists.osgeo.org/mailman/listinfo/mapguide-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20090406/c68530a6/attachment.html


More information about the mapguide-users mailing list