Share pushpins via URL on Bingmap

Balasaheb Molawade 136 Reputation points
2022-08-08T10:27:45.88+00:00

Hi,

We have the requirement to share the map pushpins via URL(link). We have the map in which we plot thousands of pushpins. Now we wanted to create a link to share with some third-party persons so that when they access then they are able to see pushpins on the Bing map. We checked the below link for the same. We checked “Collections editor and collections parameters” but were not able to create the link (not able to understand cid) that we can share.

Is anyone have a sample to create the link to share.

Thanks

Azure Maps
Azure Maps
An Azure service that provides geospatial APIs to add maps, spatial analytics, and mobility solutions to apps.
595 questions
{count} votes

6 answers

Sort by: Most helpful
  1. rbrundritt 15,386 Reputation points Microsoft Employee
    2022-08-11T17:37:35.793+00:00

    Ah, ok. These forums are for the Microsoft Maps (Bing and Azure Maps) platforms and unrelated to the Bing Maps consumer site, thus the confusion. I know that document your referenced. The collection functionality that existed when that doc was written isn't the same thing that is on bing.com today and I think it mainly still documented for legacy purposes as the old collection data is still available.

    That said, it looks like the new collection functionality does reuse some of the old stuff, just the cid is not exposed through the user interface (you are meant to use the share button to get the sharable link). The way I managed to get the cid when testing is by going to the tab that shows the list of all my collections, then right clicked on the one I wanted and pressed "Inspect", then looked for the "data-entityid value" in the HTML source code as shown below:

    230524-image.png

    1 person found this answer helpful.
    0 comments No comments

  2. rbrundritt 15,386 Reputation points Microsoft Employee
    2022-08-08T14:39:53.787+00:00

    In your collection, near the top you will see the word private. Click on it and it will turn to public and a share link will appear.

    229225-image.png

    229130-image.png

    0 comments No comments

  3. Balasaheb Molawade 136 Reputation points
    2022-08-09T09:42:36.453+00:00

    Hi Ricky,

    Thanks for your response. We are able to get the URL from the Bing map portal. We want similar functionality from our mapping application.

    Thanks!

    0 comments No comments

  4. rbrundritt 15,386 Reputation points Microsoft Employee
    2022-08-09T15:58:07.003+00:00

    To add a similar functionality to your web app, there are many different ways to achieve this. The first thing is to determine where you are going to host your data. Hosting the data on the bing.com/maps website is not an option (that's a consumer site/feature that could be removed at any time and has no support/SLA). If using Bing Maps, the Bing Maps Spatial Data Services is one good option. Storing the data as a flat file, such as GeoJSON somewhere online, like as a file with your app, or in Azure Blob storage (with CORs enabled) are good options. Note that the bing.com site has not option to export collections from that site either, collecitons are purely a consumer feature of the bing.com site.

    If you have multiple data sets you want your app to be able to load depending on a query string, that can accomplish fairly easily once the data is hosted somewhere, however I suspect that's not what you are looking to accomplish here.

    0 comments No comments

  5. Balasaheb Molawade 136 Reputation points
    2022-08-11T06:05:46.573+00:00

    Hi Ricky,

    Thanks for your response.

    We are not going to host data anywhere. We just want to generate a link that we can share with users and they can access it.

    We have checked the below link. We checked “Collections editor and collections parameters” but were not able to create the link (not able to understand cid).

    https://learn.microsoft.com/en-us/bingmaps/articles/create-a-custom-map-url

    Do you have a sample for the same.

    Thanks

    0 comments No comments