IPhoneLocator with Bing Map

I have forked @amg0’s repo on GitHub and modified it to use bing map instead of google map for the distance/geocode/travel time.

In order to make this work, you need to go to https://www.bingmapsportal.com/ and create an account and an API key in very similar fashion to google map. You will then need to insert the key in the googlemapkey variable of the iPhoneLocator device.

A few differences:

  1. The bicycle mode, if you select it becomes transit mode. There is no bicycle mode on bing. Instead it will give you bus and subway travel times.
  2. In any other mode than direct, I decided not to fetch the address because bing requires a separate call and with the number of call limitations, at least for now, I will skip it. You will get the location address in direct mode.
  3. The bing API gives you 125,000 call per year which is ~10,000 per month or ~333/day for free. Google at the end of my trial period is giving me 1/month. I think they were @20,000/month.

To implement, just replace the L_IPhone.lua file from the forked repository into your /etc/cmh-ludl folder

all credits due to amg0

1 Like

Quite a bit of updates since yesterday. Since I am completely illiterate in js it feels like artwork to me when working on the J_Iphone.js

The bing map now loads instead of google map. Loading the map starts a bing map session which enables getting the address without getting charged an API call.

Added the map markers. The main functionality, Geofencing, has been working perfectly.

If you want to test, just replaced the two files. L_IPhone.lua and J_IPhone.js

Edit: Made a few extra fixes. The master repo now should have full equivalent functionalities as the original Google version.

Next idea would be to merge the two so that one could switch between Google and Bing and potentially use both as failover of one another when you run out of API call credits…