Currently, I am utilizing Bing Maps to display store locations on a map. The information about the stores is coming from a dynamic JSON response. When the page loads, the map shows local stores with pushpins and infoboxes. As the map pans, my goal is to retain the pins already on the map in their positions while adding more pins for stores within the radius of the map's bounding box. These additional pins should be removed when they move out of the radius, all without affecting the original store pushpins.
At this stage, I have successfully populated the map and added new pushpins as the map moves. However, I'm facing challenges in removing the new pins while keeping the original ones intact. After conducting some online research, I believe creating two entity layers for the pins could be a solution. This way, I can remove pins from the second layer as the map pans around and replace them with new store pins.
Does this approach make sense? Can anyone provide insights on how to create separate pins on two entity layers and effectively manage pin removal on one of the layers?
Appreciate any assistance!