Re: [Gistoolkit-editor] quickwms and gistoolkit server
Brought to you by:
bitterstorm,
ithaqua
|
From: ithaqua <it...@at...> - 2004-03-22 04:46:08
|
Hi,
It took some experimentation with the Java Script to get it to work,
but eventually I did. Here is the sample code that I used:
<script language=3D'Javascript'>
// WMS servers - list here other OGC compliant map servers=20
var demisWMS =3D "http://localhost:40320/USA";
function writeMaps(){
var map =3D new quickWMS(-180, -90, 180, 90);
map.addLayer(demisWMS, "States", "1.0.0", "Modis Mosaic"); =09
map.onError =3D function (layer){alert("error")}
map.layers[0].format=3D"png"; =09
map.writeDOM("myMap", 350, 195, 350, 175,
"background-color:white;border-style:solid;border-width:1;border-color:blac=
k;");
map.toolbar =3D new toolBar(map);
map.toolbar.writeDOM(350,170,true); =09
map.refresh();
}
writeMaps()=09
</script>=09
So, the key things that need to change, are to remove the trailing "/"
from your URL, and change the format to either "jpg", or "png".
Hope that helps.,
Ithaqua
On Fri, 2004-03-19 at 16:34, Johannes Buehler wrote:
> hi,
> does anyone known how to connect quickwms to the gistoolkit server?
> quickwms is a simple javascript client for accessing wms servers.
> (http://giserver.esrin.esa.int/quickwms/)
>=20
> as descriped in the documentation the wms server can be accessed
> through the url of the wms service (http://localhost:40320/dhm/) and the =
layername,=20
> in my example (NewLayer).=20
>=20
> <script language=3D'Javascript'>
>=20
> // WMS servers - list here your favorite server
> // Changes: 2003-10-24 : Added http:// to the DEMIS and ESRIN server urls
> var gistoolkit =3D "http://localhost:40320/dhm/";
>=20
> function writeMaps(){
>=20
> var map =3D new mapWMS(-180,-90,180,90);
> map.addLayer(gistoolkit, "NewLayer");
> map.layers[0].format=3D"JPEG";
> map.writeDOM("myMap", 350, 175, 350, 175, "background-color:white; bo=
rder-style:solid; border-width:1; border-color:black;");
> map.refresh();
>=20
> }
> writeMaps();
> </script>
>=20
> but i dont know what to parameters the gistoolkitserver requires to retur=
n the map.
> using these settings i do not get a result.
>=20
> Thanks for any hints, also with accessing the gistoolkit server with othe=
r wms clients=20
> could be interesting for me.
>=20
> Johannes
--=20
ithaqua <it...@at...>
Ithaqua Enterprises Inc.
|