Thread: [Gistoolkit-editor] quickwms and gistoolkit server
Brought to you by:
bitterstorm,
ithaqua
From: Johannes B. <joh...@od...> - 2004-03-19 22:35:53
|
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/) 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, in my example (NewLayer). <script language='Javascript'> // WMS servers - list here your favorite server // Changes: 2003-10-24 : Added http:// to the DEMIS and ESRIN server urls var gistoolkit = "http://localhost:40320/dhm/"; function writeMaps(){ var map = new mapWMS(-180,-90,180,90); map.addLayer(gistoolkit, "NewLayer"); map.layers[0].format="JPEG"; map.writeDOM("myMap", 350, 175, 350, 175, "background-color:white; border-style:solid; border-width:1; border-color:black;"); map.refresh(); } writeMaps(); </script> but i dont know what to parameters the gistoolkitserver requires to return the map. using these settings i do not get a result. Thanks for any hints, also with accessing the gistoolkit server with other wms clients could be interesting for me. Johannes -- -- Johannes Buehler __O Feldstr. 45 =`\<, 14789 Greifswald (=)/(=) joh...@od... ----------- 03834 509307 |
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. |
From: ithaqua <it...@at...> - 2004-03-24 04:19:29
|
I have updated the code to accept "JPEG", and "PING" as valid image types as well as "jpg", and "png". Till then, use the 3 letter abbreviations, instead of the 4 letter ones. ithaqua On Sun, 2004-03-21 at 22:33, ithaqua wrote: > 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='Javascript'> > // WMS servers - list here other OGC compliant map servers > var demisWMS = "http://localhost:40320/USA"; > > function writeMaps(){ > var map = new quickWMS(-180, -90, 180, 90); > map.addLayer(demisWMS, "States", "1.0.0", "Modis Mosaic"); > map.onError = function (layer){alert("error")} > map.layers[0].format="png"; > map.writeDOM("myMap", 350, 195, 350, 175, > "background-color:white;border-style:solid;border-width:1;border-color:black;"); > map.toolbar = new toolBar(map); > map.toolbar.writeDOM(350,170,true); > map.refresh(); > } > writeMaps() > </script> > > 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/) > > > > 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, > > in my example (NewLayer). > > > > <script language='Javascript'> > > > > // WMS servers - list here your favorite server > > // Changes: 2003-10-24 : Added http:// to the DEMIS and ESRIN server urls > > var gistoolkit = "http://localhost:40320/dhm/"; > > > > function writeMaps(){ > > > > var map = new mapWMS(-180,-90,180,90); > > map.addLayer(gistoolkit, "NewLayer"); > > map.layers[0].format="JPEG"; > > map.writeDOM("myMap", 350, 175, 350, 175, "background-color:white; border-style:solid; border-width:1; border-color:black;"); > > map.refresh(); > > > > } > > writeMaps(); > > </script> > > > > but i dont know what to parameters the gistoolkitserver requires to return the map. > > using these settings i do not get a result. > > > > Thanks for any hints, also with accessing the gistoolkit server with other wms clients > > could be interesting for me. > > > > Johannes -- ithaqua <it...@at...> Ithaqua Enterprises Inc. |