c#-mapscript, zooming problem on Landsat-Layer
Tamas Szekeres
szekerest at GMAIL.COM
Wed Jun 14 14:37:49 PDT 2006
Hi Christian,
If you are using the "layerObj(mapObj map)" constructor you might have to
use the latest CVS version with the following fix included in csmodule.i
/***************************************************************************
***
* Preventing to take ownership of the memory when constructing objects
* with parent objects (causing nullreference exception, Bug 1743)
****************************************************************************
*/
%typemap(csconstruct, excode=SWIGEXCODE) layerObj(mapObj map) %{:
this($imcall, true) {
if (map != null) this.swigCMemOwn = false;$excode
}
%}
%typemap(csconstruct, excode=SWIGEXCODE) classObj(layerObj layer) %{:
this($imcall, true) {
if (layer != null) this.swigCMemOwn = false;$excode
}
%}
%typemap(csconstruct, excode=SWIGEXCODE) styleObj(classObj parent_class) %{:
this($imcall, true) {
if (parent_class != null) this.swigCMemOwn = false;$excode
}
%}
The corresponding bug report is:
http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1743
However your error message is slightly confusing so i would not wonder if it
was not the only problem. I am keen to try this out.
Best Regards,
Tamas Szekeres
-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of Christian Wilmes
Sent: Tuesday, June 13, 2006 12:30 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: [UMN_MAPSERVER-USERS] c#-mapscript, zooming problem on
Landsat-Layer
Hi all,
I try to use I Layer from the Landsat-WMS in my c#-Application. The first
time I get the Layer everything works fine but after zooming or just
refreshing the map I get the following error:
msBuildWMSLayerURLBase(): WMS connection error. One of wms_onlineresource,
wms_server_version, wms_name metadata is missing in layer Landsat. Please
either provide a valid CONNECTION URL, or provide those values in the
layer's metadata.
Trying it with other layers everything is ok.
The part of the code where I add the Layer:
layerObj landsat = new layerObj(myMap);
landsat.name = "Landsat";
landsat.type = MS_LAYER_TYPE.MS_LAYER_RASTER;
landsat.status = mapscript.MS_OFF;
landsat.connectiontype = MS_CONNECTION_TYPE.MS_WMS;
landsat.connection = "http://wms.jpl.nasa.gov/wms.cgi?";
hashTableObj metaLandsat = new hashTableObj();
metaLandsat.set("wms_name", "global_mosaic");
metaLandsat.set("wms_server_version", "1.1.0");
metaLandsat.set("wms_onlineresource",
"http://wms.jpl.nasa.gov/wms.cgi?");
metaLandsat.set("wms_srs", "EPSG:4326");
metaLandsat.set("wms_format", "image/jpeg");
metaLandsat.set("wms_style", "");
metaLandsat.set("wms_connectiontimeout", "100");
landsat.metadata = metaLandsat;
landsat.setProjection("init=epsg:4326");
Hope anybody could help me with that problem.
Best Regards
Christian
--
"Feel free" – 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail
--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.8.4/363 - Release Date: 2006.06.13.
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.8.4/364 - Release Date: 2006.06.14.
More information about the MapServer-users
mailing list