How many transactions does my HERE Maps JavaScript app generate for the map view? (estimate Maps API usage and costs)

Symptoms / Triggers
-----------------------

You may need this article if you experience any of the following:

Billing or usage reports show higher transaction counts than expected
You need to estimate API usage before deploying your application
You want to understand how map tile requests translate to transactions
Your accounting or finance team asks for usage projections
You are unsure how viewport size or screen resolution impacts usage

---

Quick Answer
----------------

You can estimate the number of transactions generated by your HERE Maps JavaScript application using a formula based on viewport size, tile size, margin, and device pixel ratio.

Each map tile request contributes to the total number of requests
A transaction may include multiple tile requests, depending on your license terms

---

How to Estimate Transactions
--------------------------------

Use the following formula:

<br />((ViewportWidth + Margin) × (ViewportHeight + Margin) / (TileSize²)) × DevicePixelRatio<br />

### Steps to apply the formula

1. Identify your map viewport size (width and height in pixels)
2. Add the margin used by your application
3. Determine the tile size (default is typically 256 pixels)
4. Check the device pixel ratio:
1 → standard resolution
> 1 → high-resolution (HD) displays
5. Apply the formula to calculate the estimated number of tile requests

---

Example Calculation
-----------------------

For a typical map view:

Viewport: 800 × 800 pixels
Margin: 256 pixels
Tile size: 256
Device pixel ratio: 1 (standard display)

Calculation:

<br />(800 + 256) × (800 + 256) / (256²) × 1 ≈ 18<br />

-> This results in approximately 18 tile requests

Each tile requires an individual request, and multiple requests may be grouped into a single transaction depending on your license.

---

How to Interpret the Result
-------------------------------

A higher number of tile requests increases total usage
Larger viewports and higher pixel density (HD screens) increase request volume
Transaction count depends on how many requests are grouped per transaction (defined in your contract)

---

Important Notes
-------------------

This formula provides an estimate, actual usage may vary slightly
Licensing terms define how many requests are counted as one transaction
You should refer to your HERE contract or pricing documentation for exact billing rules

---

Applies To
--------------

HERE Maps API for JavaScript
Web applications rendering map tiles
Usage estimation and billing scenarios

---

Tags
--------

here maps usage, transaction estimation, api billing, tile requests calculation, maps javascript cost, estimate api usage, viewport tile calculation, hd tiles usage