I’ve been poking around the pre-release version of the upcoming Bing Maps 8 library. One thing that confused me was the difference between Entities and Layers, and their relationship to the new interactive Drawing Control module.
With some help from Bing Maps program manager Ricky Brundritt I think I’m starting to grasp the key ideas. Briefly, in Bing Maps 7, to add a custom shape (typically a pushpin) you would add it to a global Entities collection. In Bing Maps 8, Entities are still supported, but it’s recommended to add shapes to a Layer.
In my demo application, I added a default pushpin (purple) to the center of the map using the old Entities technique. Then I added two custom pushpins (red) above and below the center using the new Layers technique. And then I added a drawn-shape using the Drawing Tools control.
After a bit of fiddling, I was able to fetch the length() of the three collections. I believe (but I’m not sure yet) that Drawing Control shapes get added to an anonymous Layer.