[OpenLayers-Users] Can't display WMS using Spherical Mercator

Josh Livni mailing_lists at umbrellaconsulting.com
Sun Dec 30 16:17:21 EST 2007


Well I I don't see anything in your code that jumps out as wrong, which 
isn't to say others might not notice something obvious that I'm missing. 
   It seems to me your centerM should be within your restricted extent, 
and thus not greyed out...

Given you've been working on this a while, I'd consider starting with 
the spherical mercator example, removing the Yahoo and Virtual Earth 
layers, and make sure that works as a very simple demo example.  Then 
start slowly replacing stuff - eg replace the demo zoomToMaxExtent with 
your setCenter, and test.  Then replace the demo WMS with your WMS url, 
and see what happens.  This whole process should take just a few 
minutes, and might help isolate the issue.

Cheers,

  -Josh




Maria Panagou wrote:
> Josh,
>
> the google maps show but my WMS does not and it's greyed out in Layer
> switcher. I get no error in firebug, nor pink tiles. I can't file a tile url
> in the media section of Page Info. I see only openlayers and google images
> there. centerM is within extents and specified as 
>
>  var centerM=OpenLayers.Layer.SphericalMercator.forwardMercator(24, 38.3);
>
> do you mean trying it out without maxextent and restrictedextent?
>
> Thanks for your interest!
>
> Maria
>
>
>  
>
> Josh Livni-4 wrote:
>   
>> Maria,
>>
>> You mention it doesn't work -- does the google maps show, and your WMS 
>> do not?  Does nothing show?  Do you get pink tiles?  Do you get an error 
>> message in firebug?  If so, what's the error message?
>>
>> Assuming the Google Maps displays, but your WMS does not, can you give 
>> an example of a tile url for your WMS that OpenLayers is trying to 
>> load?  You can find one by going to Tools -> Page Info -> Media, and 
>> scrolling down till you find a local tile (in Firefox).
>>
>> Also, I note you center the map on centerM - which I didn't see defined 
>> in your javascript - is the centerM point in spherical mercator, and 
>> does it fit within your defined maxextent and restricted extent? 
>>
>> Finally, on that note - perhaps you should remove these extra 
>> restrictions till you get it basically working ..
>>
>> Cheers,
>>
>>    -Josh
>>
>> _______________________________________________
>> Users mailing list
>> Users at openlayers.org
>> http://openlayers.org/mailman/listinfo/users
>>
>>
>>     
>
>   



More information about the Users mailing list