Definition of transactions

27 posts / 0 new
Last post
dandronic
Definition of transactions

You have multiple services - API calls & tile server calls?

Where can I find a definition of what a "transaction" consists of, for different services? I.e. How many tiles are included in a web map? (if it depends on tiles at all)


jonathan
Generally, a transaction is a
Generally, a transaction is a request to a service, however, some services geneate multiple transactions due to the fact that they need to call out to other services.  An example of that is a call to the Directions API when the origin an destination are addresses instead of latitude and longitude coordinates.  The addresses in the call would need to be geocoded, which would also generate geocode transactions. Map transactions are generally generated when: the map is initially loaded, the zoom level changes, the type of map changes (switch from the default street map to aerial imagery, for instance), or when the user pans the map to the point where it causes the extent of the map to change by 40%. Map transactions are also generated by the Static Map API Web Service. Hope this helps; we're working on getting some FAQs published and transaction definitions will be included.

info.269
I am using Mapquest as a

I am using Mapquest as a distance calculator atm and wonder why this counts 3 transactions (i already got the geocodes so why the need to call geocoding?!

https://open.mapquestapi.com/directions/v1/routematrix?key=MYKEY&json=
{options:%20{allToAll:%20false,unit:%20k},locations:["53.58019000000000,9.75938000000000","51.15527000000000
,7.02487000000000"]}&outFormat=json

This triples my limit usage whereas it should be only 1 transaction ... is there a cool workaround to just get the distance from loc 1 to 2 with just 1 transaction?


MQBrianCoakley
Use doReverseGeocode=false.
Use doReverseGeocode=false. Otherwise the route api will reverse geocode the lat/lngs.

info.269
i tried this now and it still

i tried this now and it still uses 3 ... i don't get it

https://open.mapquestapi.com/directions/v2/routematrix?key=MYKEY&json={options:%20{allToAll:%20false,unit:%20k},locations:[{latLng:{lat:53.58019000000000,lng:9.75938000000000}},{latLng:{lat:51.15527000000000,lng:7.02487000000000}}]}&outFormat=json


MQBrianCoakley
Use doReverseGeocode=false.
Use doReverseGeocode=false. Otherwise the route api will reverse geocode the lat/lngs.

support.82
We're also seeing more geocode than expected

We also have a much higher rate of geocoding usage than we'd expect. We cache/store a list of user's locations at our end and pass lat/lon pairs for the distance API and maps API. We only use the geocoding API if the user is searching for a new location to add as a journey endpoint.

Is there a way to directly see how many transactions a request has used, or can that only be done by making requests and checking the difference in the account usage reporting in the developer site?


MQBrianCoakley
There is no tool to count
There is no tool to count transactions per request.

jasond
I am seeing the opposite

I am seeing the opposite problem. We are apparently doing 7000 direction requests per month (this seems very high to me). But only 200 or less geocoding requests. This makes no sense to me as every direction request we do is with lat/long. Is MQ caching somewhere and not marking the transaction?


MQBrianCoakley
That's odd. Can you post a
That's odd. Can you post a sample request your application is making?

jasond
Ok, I forgot about the

Ok, I forgot about the reverse geocode. I already had that turned off. That explains why on most days we get 0 geocoding requests. But now I'm not sure why we have any at all. Some of our coordinates may be for roads that are newly constructed and don't exist in MQ yet. Could that cause it? Here's a sample:

http://open.mapquestapi.com/directions/v2/route?key=[KEY]&outFormat=xml&...

If succesful, we do a static map request, but that shouldn't have any geocoding requests.


MQBrianCoakley
That request should not count
That request should not count any geocode transactions.

g.rouleau
We're also seeing more geocode than expected !!!

I have the same remark : we have a very high rate of geocoding although we make very few calls to the geocoding service.

We make calls to the direction service with locations so the geocoding service should not be called.

Is there any parameter in the directions service call that will cause calls to the geocoding service ? (for example the doreversegeocode parameter)

Another remark : stats are not the same per day and per month or year.


MQBrianCoakley
Use doReverseGeocode=false.
Use doReverseGeocode=false. Otherwise the route api will reverse geocode the lat/lngs.   A reporting issue was recently resolved so you shouldn't see that strangeness any more.

g.rouleau
Still have an unexpected number of transactions

We tried yesterday with the doReverseGeocode set to false but we still have a number of transactions for Open Geocoding that we do not understand.

As an example, 26 calls to Directions with OptimizedRoute parameter, 5 calls to Directions with RouteMatrix parameter and no call to Geocoding generate 31 Open Directions transactions and 489 Open Geocoding transactions.

Could you explain us the reason ?

Thank-you,

examples :

http://open.mapquestapi.com/directions/v1/optimizedroute?key=KEY&inForma...

http://open.mapquestapi.com/directions/v1/routematrix?key=KEY&inFormat=x...

 


MQBrianCoakley
Route options are being
Route options are being ignored when in kvp as part of a request that is using inFormat=xml. The doReverseGeocode option needs to be part of the option xml node.

g.rouleau
We changed the request to

We changed the request to have the doReverseGeocode as part of the option xml mode and it works now.

The number of transactions is exactly the number of calls to the directions service.

Thanks for your help.


leeds-ces
Open Map Transactions

Hi, could I ask you to elaborate on this please?

Posted above by Jonathan on Tue, 08/25/2015 - 07:41

Map transactions are generally generated when: the map is initially loaded, the zoom level changes, the type of map changes (switch from the default street map to aerial imagery, for instance), or when the user pans the map to the point where it causes the extent of the map to change by 40%.....

Is this saying when the map loads, it uses 1 transaction, when the zoom level changes thats 1 transaction, and moving beyond 40% is 1 transaction?

Im struggling to get an understanding of how the Open Map trabsactions are aggregated, as I am seeing a rather high transaction count on loading and panning a map. Do Map tile loads also consume transactions?

Many thanks!

 

 

 

 


cotton
We are also seeing

We are also seeing unexpectedly high open map transactions. I would like a very clear definition of what is going on so perhaps coding changes could be made to make efficient use of our transactions. We may also turn off nice to have but unneccessary features such as the small map overlay if those features add to the transaction count.

 

 

 

 


MQBrianCoakley
When the MQA.TileMap
When the MQA.TileMap (MapQuest JavaScript sdk) constructor or the MQ.TileLayer is added to a L.Map (Leaflet) and the map constructor is called there is a transaction counted. Or, when a map is created, it is counted. Then any change in map type, zoom level, programmatic change in zoom or center, or any pan by the user changing 40% of the viewable map are transactions. Often what happens is the map constructor has a default center and zoom and the map is recentered and/or rezoomed after creation which doubles or triples the number of map transactions. This can be avoided by creating collections of objects and putting them in the map constructor (MQ) or on the map before tiles are added (Leaflet) so a single transaction is counted rather than several.

als
Efficient methodolgy?

Would you be able to provide a methodology to be most efficient for this please?
I do exactly that - load a map with a default centre and zoom, then I geocode an address, and have to re-centre the map to those coords (and with a new zoom I think)

I'm seeing roughly 7-8 times the number of transactions compared to the number of page views as per my Google Analytics.

This would be appreciated muchly.

Regards
Nigel


MQBrianCoakley
You can do all of the
You can do all of the geocoding before any map is created. This means not using the map sdk geocode module/plugin - but the web service directly. Do all of the geocoding first, put all of the results in a collection then create the map with that collection or the bounds of that collection. That way there's only one map transaction.

insoftd
hi,

hi,

hi,

I have same problem with this parameter doReverseGeocode as even if I don't need it  and tried to ignore it as the documentation saying it just does not work.

E.g.:

Testing bellow service (the sample presented right in the mapquest documentation) with doReverseGeocode=Yes 10 times returned 10 counts for Direction service  and 20 counts for ReverseGeocode service

http://www.mapquestapi.com/directions/v2/route?key=KEY&callback=renderAd...

Testing same above service with doReverseGeocode=Yes 10 times returned 20 transactions for Direction service  and 20 transactions for ReverseGeocode service what looks abnormal despite the fact above the Mapquest said contrariar. How come?

http://www.mapquestapi.com/directions/v2/route?key=KEY7&callback=renderA...

Thank you, Ionut


greedydeepak
Transaction Limit and Copyrights

Hi,
I'm using http://www.mapquestapi.com/geocoding/v1/reverse?key={KEY}&location=LAT,LNG, how many request would be counted for each hit? I have hell no. of lat and lng. Also, can I save these results in my database and give a link to mapquest in my website?


MQBrianCoakley
Each location (reverse)
Each location (reverse) geocoded will be one transaction. Saving the results is against the terms unless using one of the Extended Rights Geocoding plans.

fuzzbuzz
Same questions as above. I'm

Same questions as above. I'm getting 3 transactions 1 for maps, 2 for traffic from this call:

 

https://www.mapquestapi.com/staticmap/v4/getmap?size=300,305&type=map&zo...


MQBrianCoakley
This is an issue in staticmap
This is an issue in staticmap/v4 that has been resolved in v5. There currently is no plan to fix this in v4.