That's awesome and super helpful. I'm still not sure where I went wrong. I believe that I did incorporate your maxExtent bit. Can you enlighten me? Or point me to a resource that can help me understand?<br><br><div class="gmail_quote">
On Thu, Jan 26, 2012 at 11:47 AM, Andreas Hocevar <span dir="ltr"><<a href="mailto:ahocevar@opengeo.org">ahocevar@opengeo.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
You didn't make the changes that we recommended. The key to solving<br>
this is the maxExtent on the WMS layer. Here's a fiddle with a<br>
simplified version of your code and your layer, to show that it works:<br>
<a href="http://jsfiddle.net/ZVaXh/" target="_blank">http://jsfiddle.net/ZVaXh/</a><br>
<br>
It doesn't matter if it's Bing or OSM, you have to configure your WMS<br>
layer the right way.<br>
<br>
Andreas.<br>
<br>
On Thu, Jan 26, 2012 at 8:35 PM, Kjel Anderson<br>
<div class="HOEnZb"><div class="h5"><<a href="mailto:kanderson@truevectortech.com">kanderson@truevectortech.com</a>> wrote:<br>
> You know, Bing is incidental in this whole thing. I'd rather be using OSM as<br>
> the background layer but I couldn't get that to work at all. Does anyone<br>
> have a working example of this with any base layer?<br>
><br>
><br>
> On Thu, Jan 26, 2012 at 11:32 AM, Kjel Anderson<br>
> <<a href="mailto:kanderson@truevectortech.com">kanderson@truevectortech.com</a>> wrote:<br>
>><br>
>> That's still not doing it but I'm noticing that the layers turns on when I<br>
>> pan to the edge of the map. What controls that?<br>
>><br>
>><br>
>> On Thu, Jan 26, 2012 at 11:28 AM, Andreas Hocevar <<a href="mailto:ahocevar@opengeo.org">ahocevar@opengeo.org</a>><br>
>> wrote:<br>
>>><br>
>>> You still forgot to set the maxExtent on your WMS layer!<br>
>>><br>
>>> Andreas.<br>
>>><br>
>>> On Thu, Jan 26, 2012 at 8:11 PM, Kjel Anderson<br>
>>> <<a href="mailto:kanderson@truevectortech.com">kanderson@truevectortech.com</a>> wrote:<br>
>>> > Hmmm. No dice with these changes incorporated. I'm not sure what is<br>
>>> > going<br>
>>> > on. For the curious there is a live link here:<br>
>>> ><br>
>>> > <a href="http://truevector.skygone.net:8080/DWTEdstest/" target="_blank">http://truevector.skygone.net:8080/DWTEdstest/</a><br>
>>> ><br>
>>> ><br>
>>> > On Thu, Jan 26, 2012 at 10:50 AM, Andreas Hocevar<br>
>>> > <<a href="mailto:ahocevar@opengeo.org">ahocevar@opengeo.org</a>><br>
>>> > wrote:<br>
>>> >><br>
>>> >> Hi,<br>
>>> >><br>
>>> >> you put most layer options in the layer params object, and you should<br>
>>> >> set the maxExtent on the WMS layer. Something like<br>
>>> >><br>
>>> >> tiled = new OpenLayers.Layer.WMS(<br>
>>> >> "dwt_lata_proj - Untiled",<br>
>>> >> "<a href="http://localhost:8080/geoserver/wms" target="_blank">http://localhost:8080/geoserver/wms</a>",<br>
>>> >> {<br>
>>> >> layers: 'DWT:dwt_lata_proj',<br>
>>> >> styles: '',<br>
>>> >> format: format,<br>
>>> >> transparent:true,<br>
>>> >> }, {<br>
>>> >> numZoomLevels:19,<br>
>>> >> maxExtent: new OpenLayers.Bounds(<br>
>>> >> -19840232, <a href="tel:2028971.375" value="+12028971375">2028971.375</a>,<br>
>>> >> -7262943, 11534410<br>
>>> >> ),<br>
>>> >> minResolution:0.5971642833948135,<br>
>>> >> maxResolution:156543.03390625,<br>
>>> >> singleTile: true,<br>
>>> >> ratio: 1<br>
>>> >> }<br>
>>> >> );<br>
>>> >><br>
>>> >> The above should work both with singleTile: true and without.<br>
>>> >><br>
>>> >> Andreas.<br>
>>> >><br>
>>> >> On Thu, Jan 26, 2012 at 7:44 PM, Kjel Anderson<br>
>>> >> <<a href="mailto:kanderson@truevectortech.com">kanderson@truevectortech.com</a>> wrote:<br>
>>> >> > Looking at it now I see the version that is working "best" is with<br>
>>> >> > the<br>
>>> >> > wms<br>
>>> >> > layer being untiled.<br>
>>> >> ><br>
>>> >> > function init(){<br>
>>> >> > // if this is just a coverage or a group of them,<br>
>>> >> > disable a<br>
>>> >> > few items,<br>
>>> >> > // and default to jpeg format<br>
>>> >> > format = 'image/png';<br>
>>> >> ><br>
>>> >> ><br>
>>> >> > var bounds = new OpenLayers.Bounds(<br>
>>> >> > -19840232, <a href="tel:2028971.375" value="+12028971375">2028971.375</a>,<br>
>>> >> > -7262943, 11534410<br>
>>> >> > );<br>
>>> >> > var options = {<br>
>>> >> > controls: [],<br>
>>> >> > maxResolution: 49130.03515625,<br>
>>> >> > projection: "EPSG:900913",<br>
>>> >> > units: 'm'<br>
>>> >> > };<br>
>>> >> > map = new OpenLayers.Map('map', options);<br>
>>> >> ><br>
>>> >> > var road = new OpenLayers.Layer.Bing({<br>
>>> >> > name: "Road",<br>
>>> >> > key: apiKey,<br>
>>> >> > type: "Road"<br>
>>> >> > });<br>
>>> >> > var hybrid = new OpenLayers.Layer.Bing({<br>
>>> >> > name: "Hybrid",<br>
>>> >> > key: apiKey,<br>
>>> >> > type: "AerialWithLabels"<br>
>>> >> > });<br>
>>> >> > var aerial = new OpenLayers.Layer.Bing({<br>
>>> >> > name: "Aerial",<br>
>>> >> > key: apiKey,<br>
>>> >> > type: "Aerial"<br>
>>> >> > });<br>
>>> >> ><br>
>>> >> > map.addLayers([road, hybrid, aerial]);<br>
>>> >> ><br>
>>> >> > tiled = new OpenLayers.Layer.WMS(<br>
>>> >> > "dwt_lata_proj - Untiled",<br>
>>> >> > "<a href="http://localhost:8080/geoserver/wms" target="_blank">http://localhost:8080/geoserver/wms</a>",<br>
>>> >> > {<br>
>>> >> > width: '512',<br>
>>> >> > srs: 'EPSG:900913',<br>
>>> >> > layers: 'DWT:dwt_lata_proj',<br>
>>> >> > height: '386',<br>
>>> >> > styles: '',<br>
>>> >> > format: format,<br>
>>> >> > transparent:true,<br>
>>> >> > numZoomLevels:19,<br>
>>> >> > minResolution:0.5971642833948135,<br>
>>> >> > maxResolution:156543.03390625<br>
>>> >> > },<br>
>>> >> > {singleTile: true, ratio: 1}<br>
>>> >> > );<br>
>>> >> ><br>
>>> >> > map.addLayer(untiled);<br>
>>> >> ><br>
>>> >> > // build up all controls<br>
>>> >> > map.addControl(new OpenLayers.Control.PanZoomBar({<br>
>>> >> > position: new OpenLayers.Pixel(2, 15)<br>
>>> >> > }));<br>
>>> >> > map.addControl(new OpenLayers.Control.Navigation());<br>
>>> >> > map.addControl(new<br>
>>> >> > OpenLayers.Control.Scale($('scale')));<br>
>>> >> > map.addControl(new<br>
>>> >> > OpenLayers.Control.MousePosition({element:<br>
>>> >> > $('location')}));<br>
>>> >> > map.addControl(new OpenLayers.Control.LayerSwitcher());<br>
>>> >> ><br>
>>> >> > On Thu, Jan 26, 2012 at 10:33 AM, maw269 <<a href="mailto:maw269@gmail.com">maw269@gmail.com</a>> wrote:<br>
>>> >> >><br>
>>> >> >> Is your bing layer imagery? I've had nothing but issues combining<br>
>>> >> >> layers<br>
>>> >> >> with<br>
>>> >> >> Bing Imagery layers.<br>
>>> >> >> Anyhow, can you post the relevant code so we could take a look?<br>
>>> >> >> --Matt<br>
>>> >> >><br>
>>> >> >> --<br>
>>> >> >> View this message in context:<br>
>>> >> >><br>
>>> >> >><br>
>>> >> >> <a href="http://osgeo-org.1560.n6.nabble.com/overlaying-tiled-WMS-on-top-of-bing-tp4341145p4341275.html" target="_blank">http://osgeo-org.1560.n6.nabble.com/overlaying-tiled-WMS-on-top-of-bing-tp4341145p4341275.html</a><br>
>>> >> >> Sent from the OpenLayers Users mailing list archive at Nabble.com.<br>
>>> >> >> _______________________________________________<br>
>>> >> >> Users mailing list<br>
>>> >> >> <a href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a><br>
>>> >> >> <a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br>
>>> >> ><br>
>>> >> ><br>
>>> >> ><br>
>>> >> > _______________________________________________<br>
>>> >> > Users mailing list<br>
>>> >> > <a href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a><br>
>>> >> > <a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br>
>>> >> ><br>
>>> >><br>
>>> >><br>
>>> >><br>
>>> >> --<br>
>>> >> Andreas Hocevar<br>
>>> >> OpenGeo - <a href="http://opengeo.org/" target="_blank">http://opengeo.org/</a><br>
>>> >> Expert service straight from the developers.<br>
>>> ><br>
>>> ><br>
>>> ><br>
>>> > _______________________________________________<br>
>>> > Users mailing list<br>
>>> > <a href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a><br>
>>> > <a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br>
>>> ><br>
>>><br>
>>><br>
>>><br>
>>> --<br>
>>> Andreas Hocevar<br>
>>> OpenGeo - <a href="http://opengeo.org/" target="_blank">http://opengeo.org/</a><br>
>>> Expert service straight from the developers.<br>
>><br>
>><br>
><br>
<br>
<br>
<br>
--<br>
Andreas Hocevar<br>
OpenGeo - <a href="http://opengeo.org/" target="_blank">http://opengeo.org/</a><br>
Expert service straight from the developers.<br>
</div></div></blockquote></div><br>