Hi Michaël,
Works fine and lists WMS attributes in an easily readable way. Perhaps it would
be better to keep the ? and & signs so that the test in the box makes a
copy-pasteable and working WMS url which can be copied into browser. Using
replaceAll("(\\?)|&","$1&\n")); makes a result which can be used for pasting
into browser, even the first line seems to have ?&
You can test with the service URLs
http://188.64.1.61/cgi-bin/ms_ows and
http://188.64.1.61/cgi-bin/ms_ows?sql=shop='supermarket'
If you want to do more improvement, the tool seems to take now the URL for the
first WMS layer on the layer list and it does not care if the layer is active
or not. Thus the only way to get the URL of a certain WMS layer is to place it
on the top of the layer list. But if it gets complicated to check if one WMS
layer is selected and use that for generating URL it is not critical. Just
change the frame title into "URL of the first WMS layer on the layer list"
The tool works like a charm and gives valuable information for WMS user who has
some troubles with the service but even it is so simple with less than 10 rows
of code I do not know any other GIS program having this feature. This is what I
like in OJ.
-Jukka-
Michaël Michaud wrote:
> Hi Jukka,
> Can you try to put in beantools dir the following script :
//////////////////////////////////////////////////////////////
import com.vividsolutions.jump.workbench.model.WMSLayer;
import com.vividsolutions.jump.workbench.ui.ErrorDialog;
url = wc.getLayerManager()
.getLayerables(WMSLayer.class).iterator().next().createRequest(wc.getLayerViewPanel())
.getURL();
ErrorDialog.show(wc.workbench.frame, "URL of requested WMS",
url.toString().substring(0, 64), url.toString().replaceAll("(\\?)|&",
"$1\n"));
//////////////////////////////////////////////////////////////
> If it does what you want, I would be pleased to include it in the
distribution,
Michaël
Le 14/08/2011 16:48, Rahkonen Jukka a écrit :
> Hi,
>
> I am using quite often this Beanshell script for checking what WMS URL is
> been used.
>
> http://sourceforge.net/apps/mediawiki/jump-pilot/index.php?title=Beanshell:Get_the_WMS_URL_that_JUMP_is_using
>
> It would be nice to access the script directly as a BeanTool from the OJ menu
> but obviously there is need to write a little bit more code before it works.
> I would guess it is basically just missing a text window for writing out the
> result.
>
> -Jukka Rahkonen-
> ------------------------------------------------------------------------------
> FREE DOWNLOAD - uberSVN with Social Coding for Subversion.
> Subversion made easy with a complete admin console. Easy
> to use, easy to manage, easy to install, easy to extend.
> Get a Free download of the new open ALM Subversion platform now.
> http://p.sf.net/sfu/wandisco-dev2dev
> _______________________________________________
> Jump-pilot-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>
>
------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management
Up to 160% more powerful than alternatives and 25% more efficient.
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
Jump-pilot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management
Up to 160% more powerful than alternatives and 25% more efficient.
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
Jump-pilot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel