[mapguide-users] mapguide-rest
Rémy Gourrat
rgourrat at ag-carto.fr
Mon Dec 5 10:08:58 PST 2016
Thanks Jackie,
Sorry i come back on this post very later. For memory, I am on mapguide 2.5.2.
First : after log in administrator, i can see resources tree via http://localhost/mapguide/rest/library/list.html, but each time i want to see resource content I have this error "Unhandled Exception Undefined variable: resIdStr at C:\Program Files\OSGeo\MapGuide\Web\www\rest\app\controller\resourceservicecontroller.php:571"
Second : I can browse the doc with http://localhost/mapguide/rest/doc/index.html, i can use API that doesn't ask authentication, but when i want try some api that ask for authentication, i have an infinite loop displaying textbox authentication with Anonymous or Administrator (I'm ok with my Administrator password...)
is there a link between the first and second point ?
Third Point : I don't want just only download an existent file but generate a shape file, on fly, from a MapGuide feature source like Oracle, PostGRe, SQLLite, in fact any feature source used by maguide...
But I don’t see it in doc mapguide-rest, is it true ?
Thanks for your answered
Rémy
-----Message d'origine-----
De : mapguide-users [mailto:mapguide-users-bounces at lists.osgeo.org] De la part de Jackie Ng
Envoyé : vendredi 18 novembre 2016 14:14
À : mapguide-users at lists.osgeo.org
Objet : Re: [mapguide-users] mapguide-rest
The general URL pattern is:
GET http://localhost/mapguide/rest/library/<transcoded path
to>.FeatureSource/data/<your file name>
On a side-note, I would recommend you to have a look at the repository through its HTML representation:
http://localhost/mapguide/rest/library/list.html
The HTML representation of the repository really maps out all the possible URLs you can access for any particular resource. It's a simple way to "explore" what the mapguide-rest API offers, as it's all there as links.
Failing that, there's also an interactive swagger API runner at:
http://localhost/mapguide/rest/doc/index.html
This lists all the APIs available with auto-generated forms for you to test the various APIs.
Now back to the topic at hand, a SHP file throws a spanner in the works because it is not one physical file. It has various components (.shx, .dbf, and a whole bunch of other files) that you also have to download and mapguide-rest does not provide any SHP-specific access path where you can download the whole SHP "file", so your application has to be aware of a SHP feature source and have some custom code that downloads all the components of the SHP "file" and serve out a zip file of all the component parts.
- Jackie
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/mapguide-rest-tp5296412p5296470.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
_______________________________________________
mapguide-users mailing list
mapguide-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users
More information about the mapguide-users
mailing list