Re: [mapguide-users] Invoke URL
hi Gordon, thanks for replying I included the openlayers source: but i am still not able to get the output onto the map. The coordinate system for the file is EPSG: 3857 only and the boundaries are correct. function render_layer() { var map = parent.Fusion.getWidgetById('Map'); var olmap = map.oMapOL; alert(olmap); var new_layer = new ol.layer.Image({ source: new ol.source.ImageWMS({ url: 'http://localhost:8080/geoserver/wms?', params: {'LAYERS': 'Mapguide_data:Indo_land'}, serverType: 'geoserver' }) }) olmap.addLayer(new_layer); } Is there anything i am doing wrong still ? Thanks, Madhur -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Invoke-URL-tp5297362p5298739.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] mapguide-rest
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-boun...@lists.osgeo.org] De la part de Jackie Ng Envoyé : vendredi 18 novembre 2016 14:14 À : mapguide-users@lists.osgeo.org Objet : Re: [mapguide-users] mapguide-rest The general URL pattern is: GET http://localhost/mapguide/rest/library/.FeatureSource/data/ 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@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Invoke URL
Oh, and you have to pass the correct boundaries and coordinate system. Check out my fusion based WMS manager i built at http://cmnmaps.ca/monitoring/ Just click the WMS Manager button. Gordon -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Invoke-URL-tp5297362p5298611.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Invoke URL
I'm not sure the whole OpenLayers library is always available to you within fusion. Adding the wms layer may need that library added. Sometimes I have to add libraries manually. -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Invoke-URL-tp5297362p5298609.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Invoke URL
Thanks Jackie, i was able to resolve that issue. However, i am trying to get a WMS layer on button click event from the widget. the fuction to be called is function render_layer() { var map = parent.Fusion.getWidgetById('Map'); var olmap = map.oMapOL; alert(olmap); var new_layer = new parent.Openlayers.Layer.Image({ source: new Openlayers.source.ImageWMS({ url: 'http://localhost:8080/geoserver/wms?', params: {'LAYERS': 'Mapguide_data:Indo_land'}, serverType: 'geoserver' }) }) olmap.addLayer(new_layer); } i get the following error in FusionSF.js SCRIPT5007: Unable to set property 'className' of undefined or null reference File: fusionSF-compressed.js, Line: 1291, Column: 456 -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Invoke-URL-tp5297362p5298585.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users