[postgis-users] pb OpenLayers using a local Mapserver

Quentin Page Quentin.Page at ensg.eu
Tue Mar 10 09:01:48 PDT 2009


hi barend,

yes I haved named every layers but I haven't bounding box.
I wrote this in every my layers

	lAYER
		NAME "routes"
		STATUS DEFAULT
		METADATA
			"wms_title" "routes"
		END
		CONNECTION "user=postgres  password=postgres dbname= ICPE host=localhost
port=5432"
		CONNECTIONTYPE POSTGIS
				DATA "wkb_geometry FROM (SELECT * from ligne_electrique where
wkb_geometry&&GeomFromText('POLYGON((799287 1885037,799912
1885037,799912 1885662,799287 1885662,799287 1885037))',32767)) as foo
using unique ogc_fid using SRID=32767"

		TYPE LINE
		CLASS
			NAME "routes"
			STYLE
				OUTLINECOLOR 10 10 10
				COLOR 0 20 255
				SIZE 4
			END
		END
	END
	END

I can see the data when i use mapserver alone but I need openlayers to
write a new feature.

the extent is the same as the map.

thank a lots

> Yes, this is (part of) a valid getCapabilities. Further down there should
> be
> a section that describes the LAYERs, with for each layer at least a  TITLE
> and a valid BBOX (= bounding box). Check if this bounding box is there and
> is corresponding with the actual data you have. If not, there is an error
> somewhere, most likely in the set up of your SRS (= spatial reference
> system
> = the projection of your map and your data), or the EXTENT (the part of
> the
> world you define your data to depict)....
>
> Barend
>
>
> On 09-03-09 16:10, "Quentin Page" <Quentin.Page at ensg.eu> wrote:
>
>> yes I tried
>> http://localhost/cgi-bin/mapserv.exe?map=ms4w/apache/htdon
>> cs/projet2009/ICPE.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities
>>
>> and I received a file mapserver.exe what I rename "mapserver.xml" this
>> file wasn't empty.
>>
>> the message is for sevreal lines
>> <DescribeLayer>
>>       <Format>text/xml</Format>
>>       <DCPType>
>>         <HTTP>
>>           <Get><OnlineResource
>> xmlns:xlink="http://www.w3.org/1999/xlink"
>> xlink:href="http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apache/htdocs/proje
>> t2009/ICPE.map&"/></Get>
>>           <Post><OnlineResource
>> xmlns:xlink="http://www.w3.org/1999/xlink"
>> xlink:href="http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apache/htdocs/proje
>> t2009/ICPE.map&"/></Post>
>>         </HTTP>
>>       </DCPType>
>>     </DescribeLayer>
>>     <GetLegendGraphic>
>>       <Format>image/gif</Format>
>>       <Format>image/png</Format>
>>       <Format>image/png; mode=24bit</Format>
>>       <Format>image/jpeg</Format>
>>       <Format>image/wbmp</Format>
>>       <DCPType>
>>         <HTTP>
>>           <Get><OnlineResource
>> xmlns:xlink="http://www.w3.org/1999/xlink"
>> xlink:href="http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apache/htdocs/proje
>> t2009/ICPE.map&"/></Get>
>>           <Post><OnlineResource
>> xmlns:xlink="http://www.w3.org/1999/xlink"
>> xlink:href="http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apache/htdocs/proje
>> t2009/ICPE.map&"/></Post>
>>         </HTTP>
>>       </DCPType>
>>     </GetLegendGraphic>
>>
>>
>> but i don't see the data
>>
>> OK, but did you try to get it working by just typing the URL in a
>> browser?
>>> That tests the actual Mapserver request, to see if that part of the
>>> setup
>>> works...
>>>
>>> Something like:
>>> http://localhost/cgi-bin/mapserv?map=/projet2009/ICPE.map&SERVICE=WMS&VERSIO
>>> N=1.1.1&REQUEST=GetCapabilities should result in a GetCapabilities XML
>>> being
>>> sent to you.
>>>
>>> Barend
>>>
>>>
>>> On 09-03-09 08:41, "Quentin Page" <Quentin.Page at ensg.eu> wrote:
>>>
>>>> thanks for your reponce
>>>>
>>>> but i have the same probleme the data doesnt viewed.
>>>>
>>>> quentin page
>>>> ecole des sciences géographique
>>>> france
>>>>
>>>>
>>>>> did you try this 'just'on mapserver, ie. without OpenLayers...? To me
>>>>> the
>>>>> URL to mapserver just seems to be wrong , I suspect that i.s.o.
>>>>>   'http://localhost/cgi-bin/mapserv?/projet2009/ICPE.map',
>>>>> it should read
>>>>>   'http://localhost/cgi-bin/mapserv?map=/projet2009/ICPE.map',
>>>>>
>>>>> --
>>>>> Barend Köbben
>>>>> International Institute for Geo-information Sciences and  Earth
>>>>> Observation (ITC)
>>>>> PO Box 6, 7500AA Enschede (The Netherlands)
>>>>> ph: +31-(0)534874253
>>>>>
>>>>>   _____
>>>>>
>>>>> Van: postgis-users-bounces at postgis.refractions.net namens Quentin
>>>>> Page
>>>>> Verzonden: zo 8-3-2009 21:14
>>>>> Aan: postgis-users at postgis.refractions.net
>>>>> Onderwerp: [postgis-users] pb OpenLayers using a local Mapserver
>>>>>
>>>>>
>>>>>
>>>>> Hi,
>>>>> i have got a problem using openlayers with a mapserver.
>>>>> It seems that my use of the constructor doesnt work for any reason.
>>>>> The mapfile which should be viewed has already worked (in PHP).
>>>>>
>>>>> Could we help me please ? Is it the good way to create a openlayers ?
>>>>> :/
>>>>>
>>>>> var map = new OpenLayers.Map('map');
>>>>> var wms = new OpenLayers.Layer.WMS( "ICPE",
>>>>>         'http://localhost/cgi-bin/mapserv?/projet2009/ICPE.map',
>>>>>         {layers: 'roads'},
>>>>>         {singleTile: true, opacity: 0.5, isBaseLayer : true}
>>>>>         );
>>>>> map.addLayer(wms);
>>>>>
>>>>> Thanks a lots !!!!!
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> postgis-users mailing list
>>>>> postgis-users at postgis.refractions.net
>>>>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>>>>
>>>>>
>>>>>
>>>>> International Institute for Geo-Information Science and Earth
>>>>> Observation
>>>>> (ITC)
>>>>> Chamber of Commerce: 410 27 560
>>>>>
>>>>> E-mail disclaimer
>>>>> The information in this e-mail, including any attachments, is
>>>>> intended
>>>>> for
>>>>> the addressee only. If you are not the intended recipient, you are
>>>>> hereby
>>>>> notified that any disclosure, copying, distribution or action in
>>>>> relation
>>>>> to the content of this information is strictly prohibited. If you
>>>>> have
>>>>> received this e-mail by mistake, please delete the message and any
>>>>> attachment and inform the sender by return e-mail. ITC accepts no
>>>>> liability for any error or omission in the message content or for
>>>>> damage
>>>>> of any kind that may arise as a result of e-mail transmission.
>>>>> _______________________________________________
>>>>> postgis-users mailing list
>>>>> postgis-users at postgis.refractions.net
>>>>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> postgis-users mailing list
>>>> postgis-users at postgis.refractions.net
>>>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>>
>>> International Institute for Geo-Information Science and Earth
>>> Observation
>>> (ITC)
>>> Chamber of Commerce: 410 27 560
>>>
>>> E-mail disclaimer
>>> The information in this e-mail, including any attachments, is intended
>>> for
>>> the addressee only. If you are not the intended recipient, you are
>>> hereby
>>> notified that any disclosure, copying, distribution or action in
>>> relation
>>> to the content of this information is strictly prohibited. If you have
>>> received this e-mail by mistake, please delete the message and any
>>> attachment and inform the sender by return e-mail. ITC accepts no
>>> liability for any error or omission in the message content or for
>>> damage
>>> of any kind that may arise as a result of e-mail transmission.
>>> _______________________________________________
>>> postgis-users mailing list
>>> postgis-users at postgis.refractions.net
>>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>>
>>
>>
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
> International Institute for Geo-Information Science and Earth Observation
> (ITC)
> Chamber of Commerce: 410 27 560
>
> E-mail disclaimer
> The information in this e-mail, including any attachments, is intended for
> the addressee only. If you are not the intended recipient, you are hereby
> notified that any disclosure, copying, distribution or action in relation
> to the content of this information is strictly prohibited. If you have
> received this e-mail by mistake, please delete the message and any
> attachment and inform the sender by return e-mail. ITC accepts no
> liability for any error or omission in the message content or for damage
> of any kind that may arise as a result of e-mail transmission.
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>





More information about the postgis-users mailing list