.Net Script equivalent to asp script to filter mapserver requests

rock well rockwell_001 at YAHOO.COM
Fri Jul 28 15:53:26 PDT 2006


Thanks for your reply guys, i am able to do what i want ...
   
  kris

Piero Cavalieri <piero.cavalieri at HEIDI.IT> wrote:
  And on client side, something like this (this is only a piece):

function retrieveMap()
{

var layersString = getLayers();
baseUrl = document.getElementById("baseUrl").value;
imgext = document.getElementById("imgext").value; //existing inline 
image

imgbox = document.getElementById("imgbox").value; //setted by dbox
imgxy = document.getElementById("imgxy").value; //setted by dbox

//build url
queryString = baseUrl + layersString + "&mode=browse" + zoomStr 
+"&imgext=" + imgext + "&imgbox=" + imgbox + "&imgxy=" + imgxy;
if(jsDebug == 1) alert(queryString);

mapsrvNet.AjaxMethods.getMap(queryString, retrieveMapImage_callback);
}

function retrieveMapImage_callback(res)
{
if(jsDebug == 1) alert("\nres.error: " + res.error +"\nres.value: 
"+res.value+"\nType of res.value: "+typeof(res.value));
try {
if(typeof(res.value) == 'object' && res.error == null) {
//immagini
imgMapOff.src = res.value.mapImgUrl;
imgRefOff.src = res.value.referenceMap;
imgScalebarOff.src = res.value.scalebar;
if(jsDebug == 1) 
alert(imgMapOff.src+"\n"+imgRefOff.src+"\n"+imgScalebarOff.src);
//hidden variables
document.getElementById("mapwidth").value = res.value.mapwidth;
document.getElementById("mapheight").value = 
res.value.mapheight;
document.getElementById("imgxy").value = res.value.imgxy;
document.getElementById("imgext").value = res.value.imgext;
document.getElementById("legend").innerHTML = res.value.legend;
document.getElementById("referenceMap").value = 
res.value.referenceMap;
if(jsDebug == 1) alert(res.value.legend);
setTimeout("updateImg()",swapMapImageTime);
} else {
throw res.error.toString();
}
} catch (exception) {
this.status = "----------- PROBLEMS RETRIEVING MAP ! -------------";
if(jsDebug == 1) { alert(exception); }
}
}

You could work in similar ways for query mode, etc.
This was build using AjaxPro 
(http://www.codeplex.com/Wiki/View.aspx?ProjectName=AjaxProStarterKit).
Obviously this is only one possible way to work with MapserverCGI.

Ciao
Piero

Tamas Szekeres ha scritto:
> How about:
>
> http://www.nabble.com/WMS-Server-call-in-.net-tf1577953.html#a4295350
>
> Tamas
>
>
>
> 2006/7/27, rock well :
>>
>> Hello all, i am trying to generate a map by requesting the map server 
>> using
>> like a proxy call to the server. I found this asp script in
>> http://mapserver.gis.umn.edu/docs/howto/wms_server which
>> does the same, when i used the same script in asp.net i found that .net
>> doesnt support xmlhttp, so i registered the required dlls for .net to
>> support xmlhttp, but still the script doesnt give me any output .... Are
>> there any changes to be made in this script to make it work in 
>> asp.net ...
>>
>> well i am sorry if this post is unclear, i could provide with more
>> information if you need ..
>>
>> Thanks for your effort and time .....
>> kris
>>
>>
>> ________________________________
>> Yahoo! Music Unlimited - Access over 1 million songs. Try it free.
>>
>>
>


--
Il contenuto di questo messaggio e' confidenziale e la lettura non
autorizzata dello stesso viola i diritti di privacy del mittente e del
destinatario.

Se avete ricevuto questo messaggio per errore siete pregati di
rimuoverlo dal Vostro sistema.


 		
---------------------------------
Groups are talking. We´re listening. Check out the handy changes to Yahoo! Groups. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20060728/fd26248e/attachment.htm>


More information about the MapServer-users mailing list