[OpenLayers-Users] Switching between a Google/Bing base layer to WMS base layer...

David Fawcett david.fawcett at gmail.com
Wed Aug 18 10:39:57 EDT 2010


Your layer projection block should reflect the spatial reference
system of the data that the layer is based on (input projection).  The
projection block at the map level sets the output projection when your
application receives a normal MapServer request.  For WMS requests,
this is handled by the layer wms_srs metadata.

I don't totally understand your problem, but I think that there are
two potential areas to look at:

1.  Is OpenLayers sending the correct WMS request to your MapServer
app to get the layer that it needs.

2.  If the WMS request is correct, is your MapServer app configured to
return the correct layer?

You can use FireBug to look at the WMS request.

David.

On Wed, Aug 18, 2010 at 9:18 AM, Paul james <pauljame at gmail.com> wrote:
> Thanks!
>
> Yes, i tried my layer two ways :
> PROJECTION
>      "init=epsg:4326"
> END
>
> ==> Nothing appears
>
> PROJECTION
>      "init=epsg:900913"
> END
>
> ==> The layer was draw, but in other location (0 0´0´´E 0 0´0´´N)
>
> Paul
>
> On Wed, Aug 18, 2010 at 11:08 AM, David Fawcett <david.fawcett at gmail.com>
> wrote:
>>
>> Paul,
>>
>> I don't think that it matters for this case, but I think that you want
>> to drop the '+' sign from your MAP level projection block.
>>
>> Do you have a projection block for your layer?  That is definitely
>> required.
>>
>> David.
>>
>> On Wed, Aug 18, 2010 at 9:00 AM, Paul james <pauljame at gmail.com> wrote:
>> > Yes, My proj.4 has EPSG:900913...
>> >
>> > My mapfile:
>> >
>> > MAP
>> > ...
>> >   PROJECTION
>> >          "+init=epsg:4326"
>> >   END
>> >
>> >   WEB
>> >         IMAGEPATH '...'
>> >         IMAGEURL '...'
>> >
>> >         METADATA
>> >             "wms_title"     "WMS Server"
>> >             "wms_onlineresource" "..."
>> >             "wms_srs"       "EPSG:4326  EPSG:900913 EPSG:3857"
>> >             "wms_feature_info_mime_type" "text/html"
>> >             "labelcache_map_edge_buffer"    "-10"
>> >         END
>> >     END
>> > ...
>> >
>> > LAYER
>> >         NAME TestBase
>> >         METADATA
>> >             "wms_srs"       "EPSG:900913"
>> >             "wms_title"    "TestBase"
>> >             "wms_feature_info_mime_type" "text/html"
>> >         END
>> >
>> >
>> > Thanks
>> >
>> > Paul
>> >
>> >
>
>



More information about the Users mailing list