[mapserver-users] How to integrate Openlayers + MapScript C# + Postgis

Marco Araujo marcoaraujolsys at hotmail.com
Thu Mar 14 07:47:07 PDT 2013


Thanks Stephen,
I believe that it would not to use CGI for I will apply different filters on the data map. For example, my User can filter the map by rivers, companies, names of residents, etc..In some cases, such as streets, will display the map with the selected street.
I believe that it is not possible to do in CGI. So understand that I need to use mapscript.
How can I get an example to simulate a WMS service to receive the parameters of openlayers? Well I'll need to get these parameters in the database (using 'select from where params') in order to assemble the map and return to openlayers.

Sincerely,Marco

> Date: Thu, 14 Mar 2013 10:02:16 -0400
> From: woodbri at swoodbridge.com
> To: mapserver-users at lists.osgeo.org
> Subject: Re: [mapserver-users] How to integrate Openlayers + MapScript C# + Postgis
> 
> On 3/14/2013 9:24 AM, Marco Araujo wrote:
> > Hi everybody,
> >
> > I'm trying to develop an application (ASP.NET C#) that gets the database
> > (postgis) map through conditions "where" and process adjustments by
> > mapscript and provide the map to be viewed by openlayer.
> 
> If I understand correctly, you want to use .NET to control what is 
> displayed in the map.
> 
> First I would make sure that you can not do everything you need using 
> mapserver cgi parameter substitution as this might be much simpler.
> 
> > Can anyone guide me on how I should proceed?
> 
> Assuming that the above will not work, then you are going to have to 
> make you mapscript application simulate a WMS service so you can call it 
> from OpenLayers.
> 
> Now:
> 
> data ---> mapserver ----> OpenLayers
> 
> In this you would program in JavaScript and change the url for the map 
> requests to pass parameters and do parameter substitution in the 
> mapfile. This is a standard Web 2.0 approach.
> 
> With mapscript:
> 
> data ---> your.net -----> OpenLayers
> 
> Here you have to simulate a WMS service so you can talk to OpenLayers 
> and then read the parameters from OpenLayers to control your .NET code 
> and how it interacts with mapserver. Since you have to pass parameters 
> to the server anyway, I would start and see if you can do it with the 
> existing mapserver code.
> 
> -Steve W
> 
> > I need a WMS (mapserver) to display dynamic data (from database)?
> >
> > Already have the following:
> > 1. up and running MapServer CGI in my Windows2008 (64bits) under IIS 7.5
> > (not apache).
> >
> > 2. The database postgis mount but I have no idea how to retrieve the data
> > and presents it in openlayers.
> >
> > 3. Tests (successfully) with openlayers presenting a static map of
> > mapserver as follows:
> > /layer = new OpenLayers.Layer.WMS("WorldMap",
> > "http://localhost/MapServer/mapserv.exe?
> > map=C:/maps/itasca.map&mode=map&template=openlayers&layer=lakespy2&layer=dlgstln2");/
> >
> > If you can help me I appreciate it.
> >
> > Sincerely,
> > Marco Araujo
> > Brazil / Sao Paulo
> >
> >
> >
> > _______________________________________________
> > mapserver-users mailing list
> > mapserver-users at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/mapserver-users
> >
> 
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20130314/6f48ec46/attachment.htm>


More information about the MapServer-users mailing list