[mapguide-users] REST Broken Parts or being Used Incorrectly? Jackie?
Jackie Ng
jumpinjackie at gmail.com
Tue Nov 17 06:34:09 PST 2015
Here's the deal.
You've have identified a major hole in the REST API capabilities (you cannot
manipulate runtime map layer/group structures, and non-spatial selection
manipulation is difficult as it requires knowing how feature IDs are encoded
to build the selection XML)
Despite mapguide-rest being in release candidate stage, I have made an
exception and implemented the necessary APIs to manipulate
layers/groups/selection in a simple manner.
The friendlier selection updates will be enabled through the existing
selection update route (when you HTTP PUT into a session-based selection
resource).
If you include selectionxml = false, the featurefilter parameter will no
longer be interpreted as MapGuide selection XML, it will be a new XML
document structure that resembles something like this:
<SelectionUpdate>
<Layer>
<Name>Parcels</Name>
<Feature>
<ID>
<Name>Autogenerated_SDF_ID</Name>
<Value>1234</Value>
</ID>
</Feature>
<Feature>
<ID>
<Name>Autogenerated_SDF_ID</Name>
<Value>2345</Value>
</ID>
</Feature>
</Layer>
</SelectionUpdate>
Note that this *does not* do arbitrary FDO filters. You should try to
architect your application to collect the required ids.
Including append = true will append the input selection to the current
selection set instead of replacing it.
Sample applications will be added/updated to demonstrate these APIs:
1. There will be a new sample application demonstrating client-side
selections and performing geometry operations on them (via the turf.js
library), and being able to save the turf.js computed geometries back up to
MapGuide as session-based layers (this uses the new layer/group manipulation
APIs and demonstrates session-based feature source creation)
2. The kitchen sink example has been modified to allow for selection
updates by entering feature ids (this demonstrates the friendlier
non-spatial selection update)
- Jackie
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/REST-Broken-Parts-or-being-Used-Incorrectly-Jackie-tp5236035p5236882.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
More information about the mapguide-users
mailing list