[OpenLayers-Users] Bing zoom level still mis match?

Takako Tucker Takako.Tucker at bbc.co.uk
Mon Mar 26 05:14:27 EDT 2012


Hello, 

I've read some threads about .Bing tile zoom level mismatch issue, but
looks like it's already been fixed for OL 2.11 RC3 version?

We have the latest .Bing layer class in our repo, but zoom level seems
to be still mis-matching. 

 

Our code to load the provider is this:

 

bbc.mtk.provider.Bing = OpenLayers.Class( bbc.mtk.Provider, {

   

    /**

     *  Property: apiKeys

     *  Bing Maps API keys we have

     */

    apiKeys: {

      'localhost': 'KeyHere',

      'www.bbc.co.uk': 'KeyHere ',

   },

 

    /**

     *  Method: load

     *  Loads the Bing Maps API and executes the callback when done

     *

     *  Parameters:

     *  callback {Function}

     *

     */

    load: function( callback ) {

        var self = this;

        this.apiKey = this.getApiKey( location.href, this.apiKeys );

 

        // nothing to load here

        // the bing layer uses the BING rest api

 

        setTimeout(function(){

            self.isLoaded = true;

            callback();

        }, 10);

    },

 

    /**

     *  Method: getMapTypes

     *  Returns the supported map types and their values

     *

     *  Returns:

     *  {Object}

     *

     */

    getMapTypes: function() {

 

        return {

            normal: 'Road',

            satellite: 'Aerial',

            hybrid: 'AerialWithLabels'

        };

    },

    /**

     *  Method: getLayer

     *  Returns a new Bing Maps layer

     *

     *  Parameters:

     *  mapType {String} - The map type to return (from getMapTypes())

     *

     *  Returns:

     *  {<bbc.mtk.OpenLayers.Layer.Bing>}

     *

     */

    getLayer: function( mapType ) {

        //mapType = mapType || Road;

        mapType = mapType || 'Road';

 

        return new OpenLayers.Layer.Bing({

                                  key: this.apiKey,

                                  type: mapType

        });

    },

 

    /**

     *  Method: getMapObject

     *  Returns the Bing Maps object

     *

     *  Returns:

     *  {BingMap}

     *

     */

    getMapObject: function( map ) {

        return map.baseLayer.mapObject;

    }

 

}); 

 

Am I missing anything here at all? 

Any advice would be much appreciated. 

 

Thanks

 

Takako

 


http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.
					
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20120326/7c92ff31/attachment.html


More information about the Users mailing list