[mapserver-users] mapserver queries and java / javascript

Arthur Delorme delorme at ipgp.fr
Fri Jan 11 08:20:29 PST 2019


I think I definitely need help with this :)

I did some cleaning to reduce the interface to a very basic example. The 
"box" button was used to activate selection with jbox (either for 
zooming or nquerying) -- without jbox anymore it generates a JS error of 
course.

There is only 1 layer here, with 2 objects. They are represented as 
points in the default view and after zooming in once. Zoom in once more 
and they will turn to 2 overlapping polygons (nquery possible on the 
overlapping part then).

I uploaded the files here: https://dl.ipgp.fr/60lwa2p

Tested with the last mapserver version available from the ubuntugis 
stable repository:
MapServer version 7.0.4 OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ 
SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=SVG_SYMBOLS 
SUPPORTS=RSVG SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER 
SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT 
SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI 
SUPPORTS=THREADS SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS INPUT=OGR 
INPUT=GDAL INPUT=SHAPEFILE

And the URL I use to access it (replace [host] with your server's):
http://[host]/cgi-bin/mapserv?map=/var/www/html/test/test.map&mode=browse&program=/cgi-bin/mapserv&map_web=TEMPLATE+test.html

If you have any advice about a simple way to do the same as jbox did, 
i.e. nquerying by drawing a box, it would be great! Just which direction 
to take and I hope I can manage to do it then.

Thanks!
Arthur

Le 10/01/2019 à 20:23, Lime, Steve D (MNIT) a écrit :
>
> It’s certainly possible to execute native MapServer queries via 
> OpenLayers or Leaflet. I originally wrote jbox (and dbox, a pure 
> JavaScript implementation) but abandoned those long ago for OpenLayers 
> and Leaflet. I’d have to see your app to comment on appropriateness of 
> each.
>
> --Steve
>
> *From:*mapserver-users 
> [mailto:mapserver-users-bounces at lists.osgeo.org] *On Behalf Of *Arthur 
> Delorme
> *Sent:* Thursday, January 10, 2019 8:44 AM
> *To:* mapserver-users <mapserver-users at lists.osgeo.org>
> *Subject:* Re: [mapserver-users] mapserver queries and java / javascript
>
> Thanks for your answer Yves.
>
> I didn't know about lealet, which seems interesting: I will probably 
> give it a try, for another application at least! And I know about 
> OpenLayers. But if I'm not wrong, this implies to develop a new 
> interface, where I would prefer to keep my MapServer app.
>
> Besides, do they allow to make queries like MapServer does? The way 
> MapServer does is perfect for my interface: select multiple 
> georeferenced objects and browse through the results to download the 
> ones of interest.
>
> Thanks again
> Arthur
>
> Le 10/01/2019 à 15:20, Yves Jacolin a écrit :
>
>     Hello Arthur
>
>     You can find such features in two main projects:
>
>     * OpenLayers: http://www.openlayers.org/
>
>     * leaflet: https://leafletjs.com/
>
>     Regards,
>
>     Y.
>
>     Le jeu. 10 janv. 2019 à 15:03, Arthur Delorme <delorme at ipgp.fr
>     <mailto:delorme at ipgp.fr>> a écrit :
>
>         Hello,
>
>         Years ago there was a Java code called JBox, which were very
>         nice to
>         make multiple queries by drawing a box on the map (which you
>         could also
>         use in browse mode to zoom).
>
>         With the restrictions on Java in modern web browsers, I would
>         like to
>         replace JBox with something else, maybe some Javascript, but I
>         can't
>         find help about this by myself, so I come to you!
>
>         I'm not super familiar with JS, even though I can write some
>         stuff. Do
>         you know about some examples / libraries to have this box tool?
>
>         Thanks!
>         Arthur
>         _______________________________________________
>         mapserver-users mailing list
>         mapserver-users at lists.osgeo.org
>         <mailto:mapserver-users at lists.osgeo.org>
>         https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
>
>     -- 
>
>     Yves Jacolin
>
>     Training and support manager - Team Manager
>     Camptocamp
>
>     Tel (France) : +33 4 58 48 20 43
>     Tel (Switzerland) : +41 21 619 10 43
>     Mob. : +33 6 18 75 42 21
>
>     email : yves.jacolin at camptocamp.com
>     <mailto:yves.jacolin at camptocamp.com>
>     http://www.camptocamp.com
>
>
>
> -- 
> Arthur Delorme
> Institut de Physique du Globe de Paris
> Bureau 219
> 1 rue Jussieu 75238 Paris Cedex 05
> Tél. : 01 83 95 76 13

-- 

Arthur Delorme
Institut de Physique du Globe de Paris
Bureau 219
1 rue Jussieu 75238 Paris Cedex 05
Tél. : 01 83 95 76 13

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20190111/b7e14f4e/attachment-0001.html>


More information about the mapserver-users mailing list