[mapguide-users] SQL Server 2008 views and fdo again

Jason Birch jason at jasonbirch.com
Mon Jan 11 00:05:59 EST 2010



carc wrote:
> 
> We are experiencing problems with using views for displaying spatial data
> and having the features be selectable.

I haven't had much experience with the SQL Server provider; downloaded and
played with it once on a  test server but that's about it.

I have a couple things you might want to look at.  

First, FDO 3.4.1 was not distributed with MGOS 2.1 (just because of bad
timing).  Since SQL Server Spatial is a new-ish provider, you might want to
try using the 3.4.1 RC2 windows SDK build to ensure you have the latest
fixes.  I'm not entirely sure if this will just work (there aren't supposed
to be ABI changes in minor versions...) but it's worth a shot.

  http://fdo.osgeo.org/content/fdo-341-downloads

Second, I'm not sure how SQL Server works for configuration under MapGuide,
but you can look at the GDAL raster provider to see how it works there. 
Maestro's generic feature source editor gives some details...

 - the config doc is uploaded using SetResourceData and type stream (a
SetResourceData upload form can be found in the Resource Service API tests:
/mapguide/mapagent/index.html)

 - the config doc is called "config", and is referenced in the FeatureSource
as follows:

<?xml version="1.0" encoding="utf-8"?>
<FeatureSource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xsi:noNamespaceSchemaLocation="FeatureSource-1.0.0.xsd">
  <Provider>OSGeo.Gdal</Provider>
  <Parameter>
    <Name>DefaultRasterFileLocation</Name>
    <Value />
  </Parameter>
  <ConfigurationDocument>config</ConfigurationDocument>
</FeatureSource>

Again, not sure for Sql Server, but for raster provider, you can get a blank
version of the config document by calling GetSchemaMapping against a given
connection string (for instance, set provider to "OSGeo.Gdal" and conn
string to
"DefaultRasterFileLocation=e:/mapguide/unmanaged/Raster/all_2006b.tif"). 
I'm guessing that in your case, you would set provider to
"OSGeo.SQLServerSpatial" and connection string to something like
"Username=user;Password=pass;Service=servername;Datastore=dbname".

Let us know whether you get any farther with this.  The FDO users mailing
list is likely also a good resource for this kind of question.

Jason
-- 
View this message in context: http://n2.nabble.com/SQL-Server-2008-views-and-fdo-again-tp4273589p4283848.html
Sent from the MapGuide Users mailing list archive at Nabble.com.


More information about the mapguide-users mailing list