Sunday, August 22, 2021

Google Maps versus Here Maps versus OpenStreetMaps/Leaflet versus Tomtom maps

Since I think around 2012, I've been lucky enough to have been able to use Google Maps for free. My usage has been relatively low so there's not been an issue. More recently however one site I created (www.5kmRadius.com.au), to help people check the 5km radius they're allow to travel for exercise in lockdown, became very popular. Both Victoria and NSW went into lockdown and restricted people's movements. 

Now you'd think a site becoming popular would be good and normally it is, but unfortunately the site's popularity made Google notice and I needed to sign up on their Google Map's freemium service which basically means once my sites go over approximately 28,000 page views I start getting charged.

Normally I add Google AdSense to my sites but for maps there's two problems.

1. Google does not allow AdSense ads to be placed on this page. My guess is because it's a single page site, but really I don't know.

2. Even if I could place ads on the site, the cost per 1,000 transactions is greater (probably double) than ads generally pay, so I'd still be running at a loss.

This has meant I needed to check and test other mapping services. Here's a summary of my findings.

Google Maps

Google provides a $200 credit (in USD) which equates to around 28,000 transaction a month (which I estimate to be around 28-30,000 page views). After that there's a charge of  of around $7 USD per 1,000 calls. With no income coming from the site it's not possible to justify paying to provide a free service to others.

Pros

Best mapping service
$200 monthly credit
Ability to limit costs (in theory as have not tested)

Cons

Cost $7 (USD) per 1,000 calls

Google Maps is the service I'm used to the most but I also think it's the best service. Overall I've not really had problems with the service.

Here Maps

After reviewing a number of services I decided to try Here Maps. Here Maps has a fairly generous freemium plan where you don't have to provide a credit card up front and you get 150,000 transactions per month. 

Pros

Greater allowance of 150,000 transactions
No credit card needed to sign up.
Conversion from Google Maps wasn't too hard.

Cons

Maps don't always display correctly. E.g. zooming parts disappear
Account states 159,000 used but receive email the account was suspended with 253,000 transaction. That is you can't rely on their account page. Mine was about 4 days behind.

OpenStreetMaps/Leaflet

I decided to try OpenStreetMaps. You're almost lead to think of this as a free service, but that's not the case. In fact I'd suggest it's possibly more expensive than Here Maps. You're encouraged to use other service providers to serve maps and prices vary. I checked a few out (Mapbox, Thurderforest) and almost signed up to Mapbox. I decided not to as I couldn't find in their document an ability to limit cost and to me that is critical.

Pros

Converted fairly easily from Here Maps and Google Maps

Cons

Free data is one thing but you need to find a third party as a tile server and thus charge. Some have introductory level plans with free usage but I couldn't find a method to limit usage and thus potential for large costs.
Maps aren't as clear.
Maps were cut off when changing what the user could see so redesigned my page so couldn't resize.

Overall I felt there's little point in using OpenStreetMaps over Here Maps. Here Maps works out cheaper if you need to pay.

Tomtom 

Perhaps the most disappointing service. After spending quite a few hours over a number of days, I was not able to get even the most basic map to display. For such a strong brand name their tutorials are lacking

Pros

Higher free usage, 50,000 tile requests a day.
Clear crisp maps.
Like the full screen button available on desktop/laptops and Android.
Activity on dash up to date.

Cons

Poor documentation such that I couldn't get Tomtom maps to work.
A feature such as a circle on a map isn't included in the base API.
Difficult to get working.
Time consuming to get working.

In conclusion, and this should be prefaced that this is about what I need the maps for, Google Maps is good if your usage is low but if your usage increases then consider Here Maps. If however paying for your usage of maps is justified as you have a method to get a return on your usage, then Google Maps offers the best service.

This is a brief summary of what I found in using the various mapping products. My usage is fairly basic requiring the display of a map, markers, circles and lines. The ability to update the position of circles and markers on the map. The ability to return the GPS location clicked on. So really I would consider these features to be basic, but I suspect that perhaps many others may only need this level of product.

I hope this information is useful.

Kelvin Eldridge
www.OnlineConnections.com.au

Update: 23 Aug 2021 (shortly after midnight)
After a few more hours, watching YouTube videos and comparing code samples, I was able to get a basic map up and going. At this point I could start testing. Able to display map, zoom in and out buttons (with full screen option) and add a marker. The next step was to add a circle which doesn't appear to be a built-in feature. I created a polygon so a circle really is just a polygon with more points. Two things I need is to create the function to create the points and then work out how to add and remove the circle. Certainly more work than other mapping software.

I'm not at this stage going to write off Tomtom maps as it provides another option.

Update: 23 Aug 2021 7:40pm
After working on the www.5kmRadius.com.au site using Tomtom maps I've completed all the features to make the Tomtom based version live. It's been time consuming but it's good to have nutted out all the issues. There's features I like about Tomtom maps plus Tomtom also provide 50,000 transactions free each day. Although what constitutes a transaction isn't always clear it means I can now further test out Tomtom's services.

Pricing for Tomtom usage

Tomtom provides 50,000 free map tiles per day. How many tiles are used each time there's a page view depends on your zoom level. According to the documentation, since I'm using zoom level 10 as the default, the map tile horizontally would cover 152.87 metres / pixel. With a HD screen having 1920 pixels  across, a map tile would cover 293 kilometres. If that's the case most people will only need to display one tile to see their 5km radius and those of their friends 5km radius. This potentially means 50,000 free tiles should be sufficient. We'll see how it goes.

If payment is required the charge is $0.05 per 1,000 requests. Not sure of the currency but suspect USD which equates to about 7 cents per 1,000 tiles. Tomtom has a prepaid credit option which starts at 25 euro which equates to around $40 AUD.

Normally usage isn't a problem for me as I have relatively low use sites displaying 5,000 or less page views a day. Because of Victoria and NSW locking down at the same time usage on my site has been what I consider huge. The usage is however tapering off. What is important however it by using each mapping product and reviewing their prices has left me better placed for whatever the future may hold.

Update: 23 Aug 21 11:48pm
The results of testing.
Time: 3 hours 44 minutes
Page views: 1,028
Tiles: 11,999
Approximately 12 tiles per page view
Thus 50,000 tiles served in this test correlates to approximately 4,167 page views.

Based on 12 tiles server per page, the cost per 1,000 page views is around 84 cents. Hopefully this figure helps others who are evaluating different mapping service options.

Update: 24 Aug 2021
Response from HERE.
I received support email with a link which states "It can take around 48 hours for usage data to be available on this page." This is 2 days. What I found is the usage data was around 4 days behind. When the account was suspend the usage data was not updated. This doesn't stop you from using HERE but it does allow you to factor in the slow updating of their information. It is probably better to determine a way to estimate usage from your own stats otherwise you could end up with excess charges.

Update: 24 Aug 2021
Response from Tomtom. I had a hard time getting their basic map to work. I have to eat humble pie. The basic example is provided here and I made multiple mistakes. One when I copied and paste the key where I left in "<" and ">" at either end. The second is I didn't read/understand the note "With a CDN: https://api.tomtom.com/maps-sdk-for-web/cdn/6.x/<version>/maps/maps-web.min.js - Note: Include latest version in the URL". You need to replace "<version>" in two places with the latest version number. Finding the latest version number is a bit obscure. So in essence the fault was mine, but to be fair, each other site provided examples where only the key needed to be replaced for the basic example to work. IT's easier to see your errors in hindsight. Hopefully my error may help others.

Update: 25 Aug 2021
Reviewing historical page views for the 14th of August the page views for the site was 43,633 and unique page views were 31,648.. The transactions according to HERE for the 14th of August was 37,930 total and 37,574 tiles. A quick correlation would indicate HERE transactions roughly equate to about 15% less than the number of page views. 

For the period from the  to29th July to 20th of August HERE reported 149,338. The page views on my sites totalled 185,067. My account account was suspended for the remaining of the month with an email stating 253,000 transactions.

Update: 26 Aug 2021
It's a new month for my account with HERE maps but unfortunately the account is still suspended. Waiting for a response. This means if you're using the Freemium account and reach roughly 12,500 page views your account could get suspended and your site effectively become useless. The problem with HERE is once you exceed your plan the only option appears to provide your credit card details. Since they have no controls for you to limit usage it's possible to end up with huge bills. That's not a risk I'm prepared to take.

Tomtom's limitation of 50,000 transactions per day (about 4,000-5,000 page views) is working well. Once the quota is reach the map stops working, but by the next morning it is working again. Whilst I'm OK with my site stopping once the quota is reached (at least 4-5K people each day get value from the site) if I did want to pay, there's a prepaid option starting at 25 Euro or around $40AUD. At around 84 cents per 1,000 view that would provide approximately 47,000 page views and no exposure should the amount be used up quickly. Unfortunately the site has no form of income so I'm not able to fund the activity. I am continuing to research options so I can help more people but that will take time.

Updated my code so the Tomtom service is used up to 4,000 page views a day and after that OpenStreetMaps is used. The service is now operational 24/7 but there's still a possibility of OpenStreetMaps suspending the service.

Update: 27 Aug 2021
Didn't hear back from HERE maps so service is still suspended. Wondered what would happen if I opened another account. Deactivated suspended account and opened new account with different email address, created the key and pasted into code. Site is now up and running again. Doesn't give me a great deal of confidence in HERE maps but we'll see how it goes.

Update: 2 Sep 2021
In order to keep the www.5kmradius.com.au active once quotas are reached, I've programmed the site to change providers once a certain number of page views is reached. The problem I've now come up against is the time Tomtom uses isn't Australian local time and thus their count does not match the local time period and maps can stop displaying. Tomtom is based in Amsterdam but that doesn't appear to be their time base either. I suppose only time will tell!

Update: 14 Sep 2021
After quite a bit of testing I feel Tomtom's stats base the time in UTC, which I'd equate to GMT (Greenwich Mean Time).. By setting the default time as UTC the page views and the Tomtom activity page should now match. In other words 10am in Australia, which is 0:00 GMT or UTC is when the counting of tile requests reset. As a quick guide I now feel one page view equates to around 15 tile requests.



No comments:

Post a Comment

Note: Only a member of this blog may post a comment.