none
Add multiple push pins to layer RRS feed

  • Question

  • I would like to add a data set of location push pins to a layer in Bing Maps V8. The code below shows the bing maps example but uses a test generator for its data.

    var map = new Microsoft.Maps.Map(document.getElementById('myMap'), {
        credentials: 'Your Bing Maps Key'
    });
    // Generate an array of 10 random pushpins within current map bounds
    var pushpins = Microsoft.Maps.TestDataGenerator.getPushpins(10, map.getBounds());
    var layer = new Microsoft.Maps.Layer();
    layer.add(pushpins);
    map.layers.insert(layer);

    My question is: How am I supposed to format my data to insert into the layer? 

    Anything Helps

    Thank You


    Doug

    Tuesday, January 3, 2017 2:26 PM

Answers

All replies