[MapQuery] FW: WMS layered on Bing, OSM, etc.

R. Paul Warriner warrinerr at orchardparkny.org
Mon Jul 11 10:17:31 EDT 2011


Hello Folks,

 

Sorry to waste bandwidth, but this stuff is like chocolate. J "Go Steven!!"

I know the project is at an early stage in development, and I am pushing it,
but if I can throw a quick non-developer question out. 

I am curious if it is possible to overlay WMS onto one of the base layers
(OSM, Bing, etc.) at this point?

 

Code block 1:

http://gis.orchardparkny.org/opcarto/mapquery/demo/index_op_bing.html

 

Code block 2 (below):

http://gis.orchardparkny.org/opcarto/mapquery/demo/index_op_wms.html  

 

Code Block 1:

  <script type="text/javascript">

    $(document).ready(function() {

 

    //initialise mapquery with a non-spherical mercator WMS 

    var map = $('#map').mapQuery({

        layers:[{

               type:'bing',

               key:'ourkey',

               label:'Bing'

            },

            {

               type:'wms',

               label:'Parcels',

               url:'http://gis.orchardparkny.org/cgi-bin/opopen.540',

               layers:'parcel_poly_2008_4326'

            }

]

        }).data('mapQuery');

 

    map.goto({

         box:[-78.798293, 42.695841, -78.696733, 42.811194],

    });

    $('#overview').mqOverviewMap({

        map: '#map'

        });

    $('.zoom').mqZoomButtons({

        map:'#map',

        home: true

        });

    $('#zoomslider').mqZoomSlider({

        map:'#map'

        });

    $('#layermanager').mqLayerManager({map:'#map'});

    $('#mouseposition').mqMousePosition({

        map:'#map',

        x:'lon',

        y:'lat',

        precision:4

        });

    });

  </script>

 

 

 

Code Block 2:

  <script type="text/javascript">

    $(document).ready(function() {

    Proj4js.defs["EPSG:4326"] = "+proj=longlat +ellps=WGS84 +datum=WGS84
+no_defs "; 

 

    //initialise mapquery with a non-spherical mercator WMS 

    var map = $('#map').mapQuery({

        maxExtent:[-79.7600, 42.0000, -77.3700, 43.6400],

        projection:'EPSG:4326',        

        layers:[{

               type:'bing',

               key:'ourkey',

               label:'Bing'

            },

            {

               type:'wms',

               label:'Parcels',

               url:'http://gis.orchardparkny.org/cgi-bin/opopen.540',

               layers:'parcel_poly_2008_4326'

            }

]

        }).data('mapQuery');                         

 

    map.goto({

         box:[-78.798293, 42.695841, -78.696733, 42.811194],

    });

   $('#overview').mqOverviewMap({

        map: '#map'

        });

    $('.zoom').mqZoomButtons({

        map:'#map',

        home: true

        });

    $('#zoomslider').mqZoomSlider({

        map:'#map'

        });

    $('#layermanager').mqLayerManager({map:'#map'});

    $('#mouseposition').mqMousePosition({

        map:'#map',

        x:'lon',

        y:'lat',

        precision:4

        });

    });

  </script>

 

 

Best Always,

Paul

 

R. Paul Warriner

Network Coordinator

Town of Orchard Park

4295 S Buffalo St

Orchard Park, NY 14127

716.662.6403

opit at orchardparkny.org <mailto:warrinerr at orchardparkny.org> 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapquery/attachments/20110711/1a840329/attachment-0001.html


More information about the MapQuery mailing list