Consulting

Results 1 to 3 of 3

Thread: bing map api rest

  1. #1

    bing map api rest

    https://dev.virtualearth.net/REST/v1/... with this Rest Api, based postal code 80128 and naturaly Italia, how to get all street name, latitude and longitude?

    tks
    Sal
    1 help 1 pizza
    2 help 1 pizza 1 caff?
    3 help 1 pizza 1 caff? 1 mozzarella
    ...
    Spaghetti, Lasagne and Tortellini for the "Lady" ;-)

  2. #2
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,379
    Location
    First thoughts.... and you may not like these

    Yes, VBA can be used to interact with the Bing Maps REST API. However, there are some important considerations:
    Key Points:

    • VBA's Capabilities:
      • VBA (Visual Basic for Applications) within Microsoft Office applications like Excel can make HTTP requests, allowing it to communicate with web APIs like the Bing Maps REST API.
      • You can use objects like MSXML2.XMLHTTP to send requests and receive responses.

    • API Interactions:
      • The Bing Maps REST API uses URLs to request data, such as geocoding addresses or getting directions. VBA can construct these URLs and send them.
      • The API typically returns data in JSON or XML format, which VBA can then parse.

    • Important Transition to Azure Maps:
      • It's crucial to be aware that Bing Maps for Enterprise is being deprecated. Microsoft is recommending that developers migrate to Azure Maps.
      • Specifically:
        • Free (Basic) account customers can continue to use Bing Maps for Enterprise services until June 30th, 2025.
        • Enterprise account customers can continue to use Bing Maps for Enterprise services until June 30th, 2028.
        • Therefore, 1 for long term projects, it is highly recommended to transition to Azure maps. 1. learn.microsoft.com


          learn.microsoft.com







    • Practical Considerations:
      • Working with JSON in VBA might require additional libraries or custom parsing functions.
      • Handling API keys and authentication is essential for using the Bing Maps REST API.
      • Security is also important. Be careful when handling api keys within VBA code.

    In summary:
    While VBA can technically read the Bing Maps REST API, you should strongly consider the upcoming deprecation and explore Azure Maps as a more future-proof solution.
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  3. #3
    VBAX Newbie
    Joined
    Nov 2023
    Posts
    2
    Location
    Quote Originally Posted by sal21 View Post
    https://dev.virtualearth.net/REST/v1/sprunki retake... with this Rest Api, based postal code 80128 and naturaly Italia, how to get all street name, latitude and longitude?

    tks
    To retrieve street names, latitude, and longitude for a given postal code (e.g., 80128 in Italy) using the Bing Maps REST API, you'll need to use the Locations API. However, there are some limitations and considerations:

    • Bing Maps API Limitation: The Bing Maps REST API (https://dev.virtualearth.net/REST/v1/Locations) is designed to geocode specific addresses or postal codes to return latitude/longitude coordinates and some address details. It does not natively return a list of all street names within a postal code area in a single request. To get street names, you would typically need to:
      • Use the API to geocode the postal code to get a central point (latitude/longitude).
      • Then, potentially use additional Bing Maps services (like the Search API or Imagery API) or external data sources to retrieve street-level details for that area.

    • Approach: Here's how you can use VBA in Excel to:
      • Query the Bing Maps API with postal code 80128 (Italy).
      • Retrieve the coordinates and available address data.
      • Note that getting all street names might require additional steps or a different API/data source (e.g., OpenStreetMap).


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •