[mapserver-users] msplugin_mssql2008 and getFeature()
Gabe Codina
Gabe at Agtrix.com
Wed Feb 3 16:22:33 PST 2010
Thanks
I have a work around - I am maintaining the selection in the database and
have defined a class to highlight the selected features - ironically making
my data section even more verbose.
If I have to come back to this I will have a look at the simple view
approach (you should see some of my other data statements).
Unfortunately Postgis is not an option as we have lots of distributed
components that all work with MSSQL, the only way we would do that is to
link a postgis server to the sql one and use some sort of data
synchronization.
G
From: mapserver-users-bounces at lists.osgeo.org
[mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Tamas Szekeres
Sent: Thursday, 4 February 2010 9:43 AM
To: Gabe Codina
Cc: mapserver-users at lists.osgeo.org
Subject: Re: [mapserver-users] msplugin_mssql2008 and getFeature()
Gabe,
I suspect your issue may be related to some parsing problem with the DATA
section. I think you might want to try defining a single view for your data
and then use this view to define the DATA section like:
gExtent from MyView using unique [iId] using SRID=4326
Best regards,
Tamas
2010/2/3 Gabe Codina <Gabe at agtrix.com>
Hi All
I have a web mapping app based on ms 5.2.1 and php mapScript. Our business
layers are stored in MSSQL2008 and were transferred from postgis some time
ago.
I have a requirement to highlight selected features on the map - the way
this used to work was I would add a highlight layer to the map and addthe
selected features to it by using getShape and addFeature.
Using the mssql plugin my calls to getShape (and getFeature) always return
FALSE. I know the features are there but they cannot be retrieved.
Info:
Sample data statement
DATA "gExtent FROM (SELECT [iId],geometry::STGeomFromWKB([binExtentWKB],
4326) AS gExtent
,[cIdentifiers],[cLabel],[iSessionId] FROM
[Scratch].[tManagementUnitsGeometry] WHERE [iSessionId] = 310) AS FOO USING
UNIQUE [iId] USING SRID=4326"
Some Mapscript
if ($resTileShpIdx){
$resShape = $qLayer->getShape($resTileShpIdx,
$resShpIdx);
} else {
$resShape = $qLayer->getFeature($resShpIdx);
}
...
$newResLayer->addFeature($resShape);
Any help will be greatly appreciated.
Gabe Codina
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20100204/7dfb4de9/attachment.htm>
More information about the MapServer-users
mailing list