Page 3 of 4
Re: Map Life Facts plugin with Bing Maps support
Posted: 28 Apr 2023 21:04
by tatewise
I am making good progress with incorporating Geoapify as a mapping alternative to Google Maps and Bing Maps.
It is easy to obtain an API Key (I used my Google Account to sign in) which is free for up to 3000 geocodes per day.
Whether I can incorporate the 'confidence' feedback remains to be seen.
Re: Map Life Facts plugin with Bing Maps support
Posted: 28 Apr 2023 23:19
by Gary_G
Mike;
That's wonderful news!
Hadn't expected that you would have time to do that.
Hope that incorporating the confidence level is possible.
Re: Map Life Facts plugin with Bing Maps and Geoapify support
Posted: 01 May 2023 13:34
by tatewise
Try the attached prototype
Map Life Facts plugin Version 5.2.5 Date 01 May 2023.
It now supports
Geoapify plot geocoding.
To get an API Key visit
https://myprojects.geoapify.com/login and sign in with your Google Account is easiest.
Use the Project name:
Map Life Facts and generate a 32-character API Key.
Copy that API Key into the plugin
Set Preference Options tab,
Location Plot Options tab,
Geoapify Key field.
The
Plot Geocoder options will then allow
Geoapify which supports 3,000 plots per day for free.
On the same tab, there is a
Logging toggle that enables CSV log files for all geocoding plots.
When the plugin is closed it creates a CSV log file for each geocoder used in the Project's
Plugin Data folder.
Whenever any location is geocoded, the
Status: display now provides feedback from the geocoder.
That can include the type of location the geocoder found and its confidence level.
The details vary for each geocoder.
BTW: It may be possible to include Geoapify maps as alternatives to Leaflet and Bing maps, but that usually takes rather more coding than adding the geocoder.
Re: Map Life Facts plugin with Bing Maps support
Posted: 01 May 2023 14:56
by Gary_G
Thanks, Mike! The addition of the status info is great news.
I'll see if I can find time to try it today and let you know how it went.
Re: Map Life Facts plugin with Bing Maps support
Posted: 01 May 2023 19:13
by BillH
This is just a curiosity question.
I find that Google Maps does a very good job of geocoding. Does anyone have experience with Geoapify? How does their accuracy compare to Google Maps?
Bill
Re: Map Life Facts plugin with Bing Maps support
Posted: 01 May 2023 20:07
by Gary_G
"BillH";
I've tested it out and GEOapify is actually quite good. (I've also tried reverse geocoding to see if I got y original location).
The nice thing about the result set is that it tells one what it found as a match and provides a match metric for each.
Here is my earlier post to which a small results file was attached.
Gary_G wrote: ↑27 Apr 2023 17:18
I submitted the test set of 4 versions of Fresnoy-en-Thelle to
https://www.geoapify.com/tools/geocoding-online and downloaded the resulting .CSV file. This tool also shows what it interpreted the place-name to be and its confidence level in having correctly geocoded what was submitted.
In the case of Fresnoy-en-Thelle, the last two of the four had a 100% confidence level and both geocoded as 49.2011423, 2.2695508 (latitude,longitude). It also showed that it correctly recognized them as a general reference to the town as a whole. Strangely; the data for both came from OpenStreetMap. This test was a bit of an eye-opener. I've attached the CSV file for whoever is interested.
Re: Map Life Facts plugin with Bing Maps support
Posted: 01 May 2023 20:26
by BillH
Gary_G wrote: ↑01 May 2023 20:07
I've tested it out and GEOapify is actually quite good. (I've also tried reverse geocoding to see if I got y original location).
The nice thing about the result set is that it tells one what it found as a match and provides a match metric for each.
I did see your previous posting. I guess I have never really needed the info on the match. I was just wondering if it was any better at actually geocoding than Google Maps.
Bill
Re: Map Life Facts plugin with Bing Maps support
Posted: 01 May 2023 20:41
by tatewise
While testing the plugin I've been monitoring Google v Bing v Geoapify geocoding the same set of Place names.
I have not been keeping detailed records but my impression is they each have their strengths and weaknesses but none of them is perfect.
Re: Map Life Facts plugin with Bing Maps support
Posted: 01 May 2023 20:44
by BillH
Thanks Mike,
I will stick to Google Maps then. I have had very good results with it.
Bill
Re: Map Life Facts plugin with Bing Maps support
Posted: 01 May 2023 20:45
by Gary_G
Bill;
I guess that's really a subjective judgement that no-one can make for another.
The geocoding sites seem to work by looking at their database and seeing if there's a similar address for which they have coordinates.
Those databases are always being augmented, so the quality of the results can change from day-today.
The geoapify site also scans more than just its own database, so I think that improves the likelihood of a solid match.
That's why I like having the quality metrics and seeing what address they actually matched.
That is more than I get with any of the other sites I've tried and allows me to make a call on whether I want to use the coords.
Re: Map Life Facts plugin with Bing Maps support
Posted: 01 May 2023 21:12
by BillH
Gary,
I was just curious. I guess as I've had good results with Google Maps, I'll just stick with that.
Bill
Re: Map Life Facts plugin with Bing Maps support
Posted: 03 May 2023 14:10
by Gary_G
Mike;
Thank you for the very useful upgrade.
I found that the added geocoder, Geoapify, in version 3 works very well.
When I tried it with the "Fresnoy-en-Thelle" test-set, it worked exactly as I hoped.
The "Status" panel is extremely useful and I was able to see when I had a valid location, as opposed to when the coords were off.
Re: Map Life Facts plugin with Bing Maps support
Posted: 05 May 2023 16:02
by David2416
Hi Mike,
I have just downloaded MapLifeFacts 5.25 and run it on the Sample Project - I immediately get this message

- Screenshot 2023-05-05 170125.jpg (18.28 KiB) Viewed 1768 times
I have not run any earlier versions of the plugin
Re: Map Life Facts plugin with Bing Maps support
Posted: 05 May 2023 16:19
by tatewise
Sorry, that is a silly typo

Are you up for a quick Plugin edit?
Via the Plugin Window,
Edit... the Map Life Facts plugin and on line 3392 change
StrGeoPlot on the right to
IntGeoPlot so that the whole line reads:
Code: Select all
IntGeoPlot = tonumber(iup_gui.LoadGlobal("GeoPlot",IntGeoPlot)) -- V5.3
Then click
File > Save and close the edit window.
That will fix the bug.
Re: Map Life Facts plugin with Bing Maps support
Posted: 05 May 2023 19:11
by Gary_G
Mike;
Was the noted error reported against your last improvement for v5.2.5?
I didn't get the same error and would like to know whether it is present in the last posted version.
Re: Map Life Facts plugin with Bing Maps support
Posted: 06 May 2023 06:21
by David2416
Gary_G wrote: ↑05 May 2023 19:11
Mike;
Was the noted error reported against your last improvement for v5.2.5?
I didn't get the same error and would like to know whether it is present in the last posted version.
tatewise wrote: ↑05 May 2023 16:19
Sorry, that is a silly typo

Are you up for a quick Plugin edit?
Via the Plugin Window,
Edit... the Map Life Facts plugin and on line 3392 change
StrGeoPlot on the right to
IntGeoPlot so that the whole line reads:
Code: Select all
IntGeoPlot = tonumber(iup_gui.LoadGlobal("GeoPlot",IntGeoPlot)) -- V5.3
Then click
File > Save and close the edit window.
That will fix the bug.
Thank you, have edited and now running OK. Now to get an API key
Yes it was in the latest version 5.2.5 dated 1 May 2023 posted in this thread a few posts ago. (Not 5.25 as I posed - my typo!)
Re: Map Life Facts plugin with Bing Maps support
Posted: 06 May 2023 08:54
by tatewise
Gary, yes it was in the latest version 5.2.5 but only arose because David had "not run any earlier versions of the plugin".
It was an initialisation error that only appears for 'virgin' users.
Re: Map Life Facts plugin with Bing Maps support
Posted: 06 May 2023 12:44
by peterbel
Ver 5.2.5, Google API, 3840 x 2160 screen res'.
Picked this up from this thread and set it up for the first time, an amazing PlugIn Mike !
A couple of comments as I get to grips with it:
Web Page Options tab. some scramble of the text with my res'.

- MLF Capture.JPG (37.95 KiB) Viewed 1651 times
Web Page Options, Clicking on Marker.
"The default Map Zoom level for displaying chosen Fact plots on a Web Page Map is set by the map pane + Zoom In and – Zoom out controls below. This is best done after clicking a plot Marker."
Clicking zooms out, is that the 'Map Zoom' value? I don't seem to be able to alter this value after clicking and also I cannot see any Zoom +/- controls?
I will continue to explore!
Re: Map Life Facts plugin with Bing Maps support
Posted: 06 May 2023 13:39
by tatewise
Peter, the Web Page Map Options tab should look like the screenshot below.
I'm not sure why the display is disrupted but the User Interface Library (IUP) is sometimes a bit temperamental.
To change Zoom click on the
+ /
- zoom buttons (highlighted yellow) in the map pane.
I'm not sure what you mean by 'Google API'. Perhaps you are using the Google Maps plot geocoder.
The plugin map pane does not support Google Maps and defaults to Leaflet Maps (or optionally Bing Maps).

- WebPageMapOptions.png (183.13 KiB) Viewed 1646 times
Re: Map Life Facts plugin with Bing Maps support
Posted: 06 May 2023 20:01
by BillH
tatewise wrote: ↑12 Apr 2023 22:49
When I Google searched the Script error on Line: 0 Char: 0 the popular reason was poor web access.
It seems you may be onto something. Is there anyone local or a computer shop that might be able to investigate?
Perhaps it is a WiFi problem if you use that, or a network adapter fault, or router fault, or ... ?
Mike,
In case you were curious, I think I've found the problem. I am normally connected to my router via Ethernet cable. I tried using WiFi and the problem went away. I tried a new Ethernet cable, but that didn't help. I bought a USB to Ethernet adaptor and haven't had any problems since. So it looks like the problem was the Ethernet Adaptor on my desktop which I believe is on the motherboard.
Bill
Re: Map Life Facts plugin with Bing Maps support
Posted: 07 May 2023 06:53
by David2416
tatewise wrote: ↑06 May 2023 08:54
Gary, yes it was in the latest version 5.2.5 but only arose because David had "not run any earlier versions of the plugin".
It was an initialisation error that only appears for 'virgin' users.
That is absolutely correct. I have now obtained a Bing Key (using your instructions to get one the right length) and run against the Sample project. The results look very good.
Now to try on my test project. Can the places be selected from a named list? I don't see any mention in the help.
Re: Map Life Facts plugin with Bing Maps support
Posted: 07 May 2023 08:50
by tatewise
David, no, Places cannot be selected using a Named List.
Do you realise that Places can be synchronised with your FH Place records?
Then any existing coordinates will appear in the plugin and not need geocoding.
Places can be selected and geocoded individually by clicking on the Location: box and choosing any one from the list, or use one of the Next ... buttons to move forward (and backwards with Alt key) through the categories, or batch Geocode Plot Some Locations from the categories.
Usually, users initially want to plot all the Places with No Data.
Re: Map Life Facts plugin with Bing Maps support
Posted: 07 May 2023 09:25
by peterbel
Mike. I am using the
Google API Key and I have no +/- keys on my display, please see below.
I mentioned the screen res' as this has been an issue before, cramping up the text.
Also, when I click on a pin a very small text box appears and then the map view zooms out, the text box staying the same size, too small to read. Is that the expected action?

- MLF Capture.JPG (199.69 KiB) Viewed 1566 times
Re: Map Life Facts plugin with Bing Maps support
Posted: 07 May 2023 10:40
by tatewise
Yes, I guess it must be something to do with the screen resolution. Mine is 1600 x 900.
However, I'm not aware of anyone else reporting what you are seeing.
Have you widened the plugin window shown in your screenshot or is that the default size?
Does clicking Restore Defaults make any difference?
The text boxes displayed in the map don't change size when the zoom level changes.
The Zoom +/- buttons must just be off the left edge of the map display.
I'll think about whether the plugin can make any adjustments for the screen resolution.
Re: Map Life Facts plugin with Bing Maps support
Posted: 07 May 2023 13:07
by peterbel
tatewise wrote: ↑07 May 2023 10:40
Have you widened the plugin window shown in your screenshot or is that the default size?
The screenshot I posted was a maximised full screen.
tatewise wrote: ↑07 May 2023 10:40
Does clicking
Restore Defaults make any difference?
It didn't and the +/- buttons did not appear. However I can zoom in and out using my mouse pad controls, but the +/- button still does not appear.
I am not sure I am running this Plug In correctly, probably because I don't fully understand some of the required procedures.
For example when I selected map All Individuals it certainly processed them but the Status showed an map key error until the end when it showed OK.
I am afraid I also don't fully understand the Database Management. Are these commands affecting the FH data or a copy of it?
Sorry to be so dumb!