none
Transactions/API V8 Calls and Transaction Usage Summary RRS feed

  • Question

  • On 9/17 I used the simplest example to load a Bing map in a web browser using notepad. The Bing V8 control was used. Then I merged that code into an ASP.NET Core MVC app. I loaded the page maybe 20 times in total using notepad and ASP.NET.  A max of 50 as a far reaching never happened number.  In one session, I panned, zoomed and used the map to browse a city with a population of ~1,000 for about 5 minutes. Suspended, resumed my machine a few times that day. That is all I did with the map.

     

    When I read how a Transaction is defined in the billing documentation, I understood that when the map is loaded one Session begins and one Transaction is counted. A Session ends when the browser tab is closed or the user loads another (different) page. Use the map to pan and zoom within that Session and those pan/zoom V8 API requests are not running up my bill. MS says I don't need to pay for a user panning, zooming, changing a may type within a Session.

     

    Looking at my Overall Transaction Usage Summary for 9/17, the Aggregated Usage for that day was 124 Billable API Calls from the AJAXSession-V8.  I'm confused. I'm writing this post to get help understanding how these 124 API V8 calls were accrued.

     

    "

    Any time a session that uses the Bing Maps Version 8.0 web control, is started with a valid Bing Maps Key, one (1) transaction is counted. A session begins with the load of the Bing Maps Web Control into a user’s browser and ends when the browser is closed or the user moves to a different page. Panning, zooming, changing of the map type (i.e.: road, aerial, etc.) or overlaying data on the map within the session doesn't cause additional transactions to be accrued. https://docs.microsoft.com/en-us/bingmaps/getting-started/bing-maps-dev-center-help/understanding-bing-maps-transactions

    "

    <!DOCTYPE html>

    <html>

    <head>

        <title></title>

        <meta charset="utf-8" />

                    <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />

     

    <script type='text/javascript' src='https://www.bing.com/api/maps/mapcontrol?callback=GetMap&key={apikey}' async defer></script>

       

        <script type='text/javascript'>

        function GetMap()

        {

            var map = new Microsoft.Maps.Map('#myMap');

     

            //Add your post map load code here.

        }

        </script>

    </head>

    <body style="height:100%;width:100%">

        <div id="myMap" style=";margin:0px;padding:0px"></div>

    </body>

    </html>

    Saturday, September 21, 2019 5:34 PM

All replies

  • Hi Joel,

    What you state is correct, all actions performed within a Web map session are included, such as pan, zoom, adding points and more.  If that page is reloaded, a new transaction would be initiated.  Can you confirm that you did not reload/refresh during your sessions?  Is your map control being instantiated in a subpage that might be refreshed more often?  To be honest, 124 map loads does not seem unreasonable if you were testing and reloading the page but you will want to design your solution such that you minimize such reloads.

    There is a sample you can leverage that shows creative map loading for a tabbed panel here https://bingmapsv8samples.azurewebsites.net/#Map%20inside%20of%20a%20tabbed%20panel. It is designed such that the map will never be loaded and the cost never incurred if the user does not go to that tab.

    Sincerely,

    IoTGirl

    Sunday, September 22, 2019 5:56 AM
    Owner