none
Bing maps V7 to V8 loadModule issue RRS feed

  • Question

  • Hi,

    We are migrating from bing maps v7 to v8.

    when I am calling below function, call is not going into loadModule(). So the cluster is not appearing on the map. Please help me to resolve the issue.

    I kept alert to debug the code

    function CreateOverviewMap() {
    var overviewMap = new Microsoft.Maps.Map(
    document.getElementById("overviewMap"),
    {
    width : 800,
    height : 600,
    mapTypeId : Microsoft.Maps.MapTypeId.road,
    zoom : 2,
    credentials : "BING_MAPS_KEY"
    });

    Microsoft.Maps.loadModule('Microsoft.Maps.Clustering', function () {
    // Creating sample Pushpin data within map view
    alert('Test');
    var pushpins = Microsoft.Maps.TestDataGenerator.getPushpins(1000, overviewMap.getBounds());
    var clusterLayer = new Microsoft.Maps.ClusterLayer(pushpins, { gridSize: 100 });
    overviewMap.layers.insert(clusterLayer);
    });

    }



    Wednesday, June 29, 2016 10:52 AM

Answers

  • Try setting the zoom level of the map to 3 instead of 2. What I suspect is happening is the TestDataGenerator is generating pushpins that are everywhere but where you are looking due to the bounding box crossing the international date line.

    [Blog] [twitter] [LinkedIn]

    Wednesday, June 29, 2016 4:05 PM
  • which browser are you using? I believe there is a know issue with loading modules in IE10. I believe a fix has been added to the experimental branch and will be rolled into the release branch within a month. Try added &branch=experimental to the map script URL. Also, can you provide the map script URL you are using in your code.


    [Blog] [twitter] [LinkedIn]

    Thursday, June 30, 2016 1:51 PM

All replies

  • Try setting the zoom level of the map to 3 instead of 2. What I suspect is happening is the TestDataGenerator is generating pushpins that are everywhere but where you are looking due to the bounding box crossing the international date line.

    [Blog] [twitter] [LinkedIn]

    Wednesday, June 29, 2016 4:05 PM
  • My problem is while debugging the code it is not at all entering into the Microsoft.Maps.loadModule() function. is Something I forgot to add ?

    Thursday, June 30, 2016 6:16 AM
  • which browser are you using? I believe there is a know issue with loading modules in IE10. I believe a fix has been added to the experimental branch and will be rolled into the release branch within a month. Try added &branch=experimental to the map script URL. Also, can you provide the map script URL you are using in your code.


    [Blog] [twitter] [LinkedIn]

    Thursday, June 30, 2016 1:51 PM