*Map Life Facts Plugin Error

Writing and using plugins for Version 5 and above.
User avatar
BEJ
Gold
Posts: 27
Joined: 10 Sep 2018 17:29
Family Historian: V6.2
Location: Boston, Massachusetts, USA

Map Life Facts Plugin Error

Postby BEJ » 11 Sep 2018 23:25

I have entered my Google API code in Map Life Facts and get the error message displayed in the attached screenshot. What next?
Screenshot 2018-09-11 14.45.56.png
Screenshot 2018-09-11 14.45.56.png (10.51 KiB) Viewed 1176 times

User avatar
tatewise
Megastar
Posts: 14837
Joined: 25 May 2010 11:00
Family Historian: V6.2
Location: Torbay, Devon, UK
Contact:

Re: Map Life Facts Plugin Error

Postby tatewise » 12 Sep 2018 10:44

Sorry about that.
I presume you followed the Knowledge Base > Map Life Facts ~ Google Maps Geocoder > Manage API Key process.
That Script Error refers to the Google Maps API Key embedded in the Java Script file created by the Plugin.
The script relies on correctly arranged single ( ' ) and double ( " ) string quotes.
Your Google Maps API Key should NOT contain either of those string quotes characters, which would upset the syntax.
It should be entirely upper & lower case letters and digits, and 39 characters long.
Does that explain why the error arose?
Can you correct it by re-entering the Google Maps API Key in the Set Preferences Options tab without string quotes?

In some future version of the Plugin that Google Maps API Key will be checked to ensure it is correctly formatted.
Mike Tate ~ researching the Tate and Scott family history.

User avatar
BEJ
Gold
Posts: 27
Joined: 10 Sep 2018 17:29
Family Historian: V6.2
Location: Boston, Massachusetts, USA

Re: Map Life Facts Plugin Error

Postby BEJ » 12 Sep 2018 12:08

Thanks for your quick response, Mike Tate. I did follow the knowledge base directions. There are no quotation marks in my API Key of 39 characters. I did some experimenting and after I unchecked SMART GEOCODING, the script ran. Once I closed the Plugin I then checked SMART GEOCODING again, and the app seems to be working.

I do have three additional questions.

A.) The Google map displayed in the Map Life Facts Plugin result has a banner that says "For development purposes only." Is this normal?

B.) After reading dozens of FHUG posts and other online discussions about place I adopted the following scheme for entering location, largely relying on your advice.
• Start with the most specific locale or smallest jurisdiction and end with the largest, country. Use seven parts for every PLACe entry:
(1) “farm/building/cemetery”,
(2) street/street number,
(3) parish/village/borough/neighborhood/ward,
(4) town/city/municipality/taxing authority,
(5) county,
(6) state/province/district,
(7) country (in English).
• Separate PLACE component by commas; insert a space and comma for any PLACe type unknown.
• Enclose the first PLACe entry for “farm/building/cemetery/etc.” in quotes before the comma to aid geocoding with the Map Life Facts Plugin in Family Historian, which relies on Google Maps. The text within the string quote will be excluded from the geocoding process.

When I ran the Map Life Facts Plugin, the entries with "string quotes" were in a separate folder. I guess I can live with the two folders if my rationale for using quotation marks is accurate. Thoughts about my choices above?

C.) In older posts you suggest creating a Locations Database of Place & Address Details. Is this still relevant with the latest version of FH?

User avatar
tatewise
Megastar
Posts: 14837
Joined: 25 May 2010 11:00
Family Historian: V6.2
Location: Torbay, Devon, UK
Contact:

Re: Map Life Facts Plugin Error

Postby tatewise » 12 Sep 2018 13:53

Initially, after entering the new API Key for the first time, did you, as advised in the Manage API Key process:
"Then Close Plugin and run it again to ensure the new API Key is applied to all features."

  1. There should be no such banner if your API Key is valid and both the specified API have been enabled as advised in the Manage API Key process. Check your online console API Dashboard. If you cannot fix it, please post a screenshot.

  2. Your (7) column Place format seems OK if you need to geocode down to specific buildings and streets.
    Some users suggest putting columns (1) & (2) later so that the Place field auto-complete works better and the folders you mention later are more useful.
    If you don't need such detailed geocoding synchronised with FH Place records, then move the first few columns into the Address field. You can still produce maps geocoded with both Address & Place fields together.
    You only need to enclose anything in "quotes" if necessary to exclude from Google Geocoder and that typically only applies to private house names, as opposed to well known public buildings or company offices that Google Maps may know about.
    The two folders you mention are only in the Map Life Facts Place List selection dialogue, and with your scheme every Place must start with quote " or comma , so appears in one of those folders.
    It may be possible in a future version of the Plugin to base those folders on the first alphanumeric character of the name.

  3. You are correct that with the full street location in the Place field, and FH V6 Place records, a Locations Database of Place & Address Details is of little benefit.
Mike Tate ~ researching the Tate and Scott family history.

User avatar
BEJ
Gold
Posts: 27
Joined: 10 Sep 2018 17:29
Family Historian: V6.2
Location: Boston, Massachusetts, USA

Re: Map Life Facts Plugin Error

Postby BEJ » 12 Sep 2018 18:41

Thanks, again, for your speedy response.

A. I did "Close Plugin and run it again to ensure the new API Key is applied to all features," however I missed the step of setting limits in the Manage API Key process. That is now done. Below is a screenshot of the error message I still receive.
v3_1.png
v3_1.png (29.25 KiB) Viewed 1092 times


B. I considered moving components 1 and 2 of my PLACe scheme to the end of the string. Doing a bit of testing on line, I found that Google maps does NOT ignore components in “string quotes” or [brackets]. If Google knows of a street address it maps to that location, regardless. I have not yet been able to test this in the Plugin. Will it respond differently than Google Maps, i.e. will "string quotes" or [brackets] be ignored?

I use the Address field for the postal address, which I have found has often been used as the residence address. The problem is that the two addresses are not always the same. For instance, in my own case my "address" was used for my residence in FamilySearch in several instances when I actually resided in different towns from where I received mail.

P.S. Sorry about the size of the screenshot--it was the largest allowed by FHUG.

User avatar
tatewise
Megastar
Posts: 14837
Joined: 25 May 2010 11:00
Family Historian: V6.2
Location: Torbay, Devon, UK
Contact:

Re: Map Life Facts Plugin Error

Postby tatewise » 12 Sep 2018 19:24

  1. Can you please post just the error message box and immediate surroundings. What happens when you click OK?
    What location is being plotted on that map? Does that message apply to all plotted locations?
    Maybe if I know the exact Place name I can recreate the message, as I have never seen anything like that before.

  2. No, Google Maps itself does not handle "quotes" or [[brackets]]. That is a special feature of the Plugin.

I would record different facts with different Addresses.
i.e.
Birth event with the Address & Place where person was born.
Residence fact with Address & Place where person resides, derived from document.
Communication fact with Address & Place where mail is received.

I have attached Map Life Facts Plugin Version 4.2.1 Date 12 Sep 2018 that checks the API Key only contains alphanumerics, and in the Place List ignores leading symbols and uses the first alphanumeric to group by folders.
It is in a ZIP file that must be extracted to obtain Plugin .fh_lua file.
[EDIT: Attachment deleted as Plugin V4.5 is in Plugin Store.]
Mike Tate ~ researching the Tate and Scott family history.

User avatar
BEJ
Gold
Posts: 27
Joined: 10 Sep 2018 17:29
Family Historian: V6.2
Location: Boston, Massachusetts, USA

Re: Map Life Facts Plugin Error

Postby BEJ » 12 Sep 2018 19:57

Screenshot 2018-09-12 15.54.13.png
Screenshot 2018-09-12 15.54.13.png (185.21 KiB) Viewed 1076 times


Error box closes when hit OK; gray screen and "For development purposes only" banner remains.

User avatar
BEJ
Gold
Posts: 27
Joined: 10 Sep 2018 17:29
Family Historian: V6.2
Location: Boston, Massachusetts, USA

Re: Map Life Facts Plugin Error

Postby BEJ » 12 Sep 2018 20:01

I get the same error with every location I have tried.

My concern about using the Address field is exportability of GEDCOM for other applications. Seems not all treat Address the same, so trying to keep Place complete as possible. (I do use your export plugin.)

Later today I will try the Map Life Face Plugin update you sent.

User avatar
BEJ
Gold
Posts: 27
Joined: 10 Sep 2018 17:29
Family Historian: V6.2
Location: Boston, Massachusetts, USA

Re: Map Life Facts Plugin Error

Postby BEJ » 12 Sep 2018 20:10

I couldn't stop myself and ran v4.2.1 and got the same result as shown above.

User avatar
tatewise
Megastar
Posts: 14837
Joined: 25 May 2010 11:00
Family Historian: V6.2
Location: Torbay, Devon, UK
Contact:

Re: Map Life Facts Plugin Error

Postby tatewise » 12 Sep 2018 21:01

The Export Gedcom File Plugin usually preserves the Address field contents somehow.
Depending on the target product it may either add it to the Place field or put it in a labelled Note.
See the Help & Advice for the Output Format for the particular product that gives the options.

According to my Google searches, the error This page can't load Google Maps correctly. Do you own this web site?
is related to problems with the API Key in some way.
Please double-check through the Knowledge Base > Manage API Key steps.
Make sure that on the https://console.cloud.google.com Billing all is OK in the Overview on both the Billing account overview and Payment overview tabs with a valid Credit Card, etc...
Check the https://console.cloud.google.com APIs & Services > Dashboard and Credentials for API Key and enabled Geocoding API and Maps JavaScript API. Click on those two API and check their Quotas.

My inclination is that something is not to Google Maps liking.

If all else fails, try closing Plugin and FH, Restart PC, and run FH and Plugin again.

BTW:
The new V4.2.1 is same as previous version, except it raises an error if Google Maps API Key is entered with any non-alphanumeric character, and the Map Life Facts Place List disregards leading symbols so they are grouped by leading alphanumeric characters. Is that list better for you?
Mike Tate ~ researching the Tate and Scott family history.

User avatar
tatewise
Megastar
Posts: 14837
Joined: 25 May 2010 11:00
Family Historian: V6.2
Location: Torbay, Devon, UK
Contact:

Re: Map Life Facts Plugin Error

Postby tatewise » 13 Sep 2018 11:22

You say you get same error with every location, but I've just noticed that there are 0 Plotted 0 Defined, etc.
So try clicking the Geocode Plot This Location button top right. What happens?

What version of Windows and Internet Explorer are you running? (Tip: use Tools cog > About Internet Explorer)
It looks like Windows 10, and IE should be Version: 11.285.17134.0 Update Versions: 11.0.85 or similar.
( IE is important because that drives the Google Maps pane. )

Do the + and - buttons in the Google Maps pane do anything?
Try clicking items along the bottom of the Google Maps pane, i.e. Google, the scale bar, Terms of Use.

Check the C:\ProgramData\Calico Pie\Family Historian\Plugin Data folder contents.
With the Map Life Facts Plugin running the relevant files should be as follows with current date & time:
Map Life Facts.dat
Map Life Facts.htm
mapfacts.css
mapfacts.js

When the Plugin is closed only Map Life Facts.dat should remain.

While Plugin is running, trying opening the Map Life Facts.htm in your default browser and in IE.
It should produce a Google Map of the world with the buttons and links active.
Mike Tate ~ researching the Tate and Scott family history.

User avatar
BEJ
Gold
Posts: 27
Joined: 10 Sep 2018 17:29
Family Historian: V6.2
Location: Boston, Massachusetts, USA

Re: Map Life Facts Plugin Error

Postby BEJ » 13 Sep 2018 17:20

I created a new project and new API Key for a fresh start (and shut down the old Google project). I then proceeded with the following.
- Entered the new API in the Plugin, closed the program, closed FH app, and rebooted the computer. Turned off my firewall.
- Ran the Plugin and Reset default settings.
- Selected a Place and clicked Geocode Plot This Location, which created the Oops! error message shown in accompanying screenshot #1. (In my prior attempts I also used Geocode Plot This Location.)
- I closed everything down, and tried again. This time I got the same Ooops! message, but it was superceeded by the script error shown in Screenshot #2.
- Went to my Java Control Panel and hit Restore Default Settings. Did not notice any changes.
- Ran Plugin again. Same Oops! message, but note the status message in Screenshot #3

What version of Windows and Internet Explorer are you running? (Tip: use Tools cog > About Internet Explorer)
It looks like Windows 10, and IE should be Version: 11.285.17134.0 Update Versions: 11.0.85 or similar.
( IE is important because that drives the Google Maps pane. )

Yes, I’m using Windows 10. Yesterday it occurred to me that the browser accessing Google Maps might be part of the problem. Firefox is my default, so I also tried Google Chrome and Microsoft Edge, which is the default browser installed in Windows 10. All three brought the same result. I don’t recall seeing any advice in the Plugin about using IE (sorry if I missed it some where); I have not used IE for more than 10 years. So, I found IE Version 11.1324.15063.0 Update 11.0.85 on my computer. Again, same result (see below).

Do the + and - buttons in the Google Maps pane do anything?
Try clicking items along the bottom of the Google Maps pane, i.e. Google, the scale bar, Terms of Use.

Can no longer see the Maps pane.

Check the C:\ProgramData\Calico Pie\Family Historian\Plugin Data folder contents.
With the Map Life Facts Plugin running the relevant files should be as follows with current date & time:
Map Life Facts.dat
Map Life Facts.htm
mapfacts.css
mapfacts.js

See screenshot #4: the date is the same, but times different.

When the Plugin is closed only Map Life Facts.dat should remain.

While Plugin is running, trying opening the Map Life Facts.htm in your default browser and in IE.
It should produce a Google Map of the world with the buttons and links active.

Same Ooops! message.

Thanks again for your attention. I must move on to other tasks; I'll keep thinking about what might be the issue and let you know if I discover a solution.

User avatar
BEJ
Gold
Posts: 27
Joined: 10 Sep 2018 17:29
Family Historian: V6.2
Location: Boston, Massachusetts, USA

Re: Map Life Facts Plugin Error

Postby BEJ » 13 Sep 2018 17:21

Screenshot #1
screenshot#1.png
screenshot#1.png (212.46 KiB) Viewed 986 times

User avatar
BEJ
Gold
Posts: 27
Joined: 10 Sep 2018 17:29
Family Historian: V6.2
Location: Boston, Massachusetts, USA

Re: Map Life Facts Plugin Error

Postby BEJ » 13 Sep 2018 17:22

screeenshot #2
screenshot#2.png
screenshot#2.png (145.75 KiB) Viewed 986 times

User avatar
BEJ
Gold
Posts: 27
Joined: 10 Sep 2018 17:29
Family Historian: V6.2
Location: Boston, Massachusetts, USA

Re: Map Life Facts Plugin Error

Postby BEJ » 13 Sep 2018 17:23

screenshot #3 [file too large]
screenshot #4
screenshot#4.png
screenshot#4.png (123.62 KiB) Viewed 986 times

User avatar
BEJ
Gold
Posts: 27
Joined: 10 Sep 2018 17:29
Family Historian: V6.2
Location: Boston, Massachusetts, USA

Re: Map Life Facts Plugin Error

Postby BEJ » 13 Sep 2018 17:25

screenshot #3 [cropped]
screenshot#3.png
screenshot#3.png (35.11 KiB) Viewed 986 times

User avatar
tatewise
Megastar
Posts: 14837
Joined: 25 May 2010 11:00
Family Historian: V6.2
Location: Torbay, Devon, UK
Contact:

Re: Map Life Facts Plugin Error

Postby tatewise » 14 Sep 2018 08:58

Firstly, Oops! Something went wrong. is the standard message when the Google Maps API is not configured correctly.
It is usually accompanied by the Status: Geocoder API Request Denied see Help & Advice F.A.Q. as in screenshots.

Can you explain why the C:\ProgramData\Calico Pie\Family Historian\Plugin Data folder has two abnormal files:
Map LifeFacts.dat
Map LifeFacts.htm

as well as the two regular files:
Map Life Facts.dat
Map Life Facts.htm


Please try my API Key instead of yours to reinforce my suspicion that your Google Maps API is not configured correctly:
AIzaSyA2TnfDqunY3BBiafZmT2iPcSLLoHcIQfg

There is no risk of my Google Maps API being compromised, because as soon as our checks are complete, I will generate a new API Key and my current key will become inactive within 24 hours.

Assuming my API Key works OK, then I will post some screenshots of the Google Maps API Console for you to compare against your Project, until we discover what is set up wrongly.

BTW: All programs that have an embedded browser window such as this Plugin's Google Maps pane, and its Help & Advice window, and the FH Web Search Window, are forced to use the Windows Internet Explorer Shell as the only supported mechanism. It is perhaps not widely publicised, but when necessary it is some thing we investigate.
Mike Tate ~ researching the Tate and Scott family history.

User avatar
BEJ
Gold
Posts: 27
Joined: 10 Sep 2018 17:29
Family Historian: V6.2
Location: Boston, Massachusetts, USA

Re: Map Life Facts Plugin Error

Postby BEJ » 14 Sep 2018 13:53

Your API Key works fine. It makes sense that I missed something in the set up of my key. The Google interface I experienced is much different than what you described in the Plugin. I've been assuming that Google made changes since you wrote the instructions. I had thought I had found everything you described---guess not. User error!

In reviewing the posts in this string, I note that I missed your question to me about the place folders grouped by leading alphanumeric characters in v4.2.1. Yes, it is a great help. Not a complaint, but can you explain the order of the folders? They are not in alphabetical.

In my original Google project I had changed the name of Map Life Facts to Map LifeFacts. The script did not run, so I changed it back. That project (and API) has been deleted and I have not messed with the name in the current project.

User avatar
tatewise
Megastar
Posts: 14837
Joined: 25 May 2010 11:00
Family Historian: V6.2
Location: Torbay, Devon, UK
Contact:

Re: Map Life Facts Plugin Error

Postby tatewise » 14 Sep 2018 20:27

I suggest you delete the two Map LifeFacts.dat/htm files to avoid confusion.

I don't believe the Google Maps Console has changed, but maybe the Knowledge Base > Manage API Key steps need more screenshots.

I guess the steps Create Google Account and Enable Billing Account are OK, otherwise you wouldn't have got an API Key, but it is important you only ticked the Places option shown.

In the Knowledge Base > Get Personal API Key step you should be able to reach the Google Cloud Platform Console:
Google Cloud Platform Console.png
Google Cloud Platform Console.png (57.93 KiB) Viewed 895 times

After choosing the APIs & Services > Credentials and copying the Key value into Plugin, click the API key link to the left, and in the new screen you can use REGENERATE KEY at the top, and click the API restrictions tab much lower down as shown here:
Google Cloud Platform API Key.png
Google Cloud Platform API Key.png (37.16 KiB) Viewed 895 times

There you should use Select API for the Geocoding API and Maps JavaScript API and click Save below.

Advice continues in the next posting...
Mike Tate ~ researching the Tate and Scott family history.

User avatar
tatewise
Megastar
Posts: 14837
Joined: 25 May 2010 11:00
Family Historian: V6.2
Location: Torbay, Devon, UK
Contact:

Re: Map Life Facts Plugin Error

Postby tatewise » 14 Sep 2018 20:38

In the Knowledge Base > Manage Quota Limits step, from the Google Cloud Platform Console click the three horizontal bars top left to obtain the Navigation menu, and select APIs & Services > Dashboard to reach screen shown here:
Google Cloud Platform Dashboard.png
Google Cloud Platform Dashboard.png (46.2 KiB) Viewed 894 times

Then click on Geocoding API and Maps JavaScript API in turn (highlighted above).
In each one click the Quotas tab to adjust the limits:
Google Cloud Platform Geocoding API.png
Google Cloud Platform Geocoding API.png (33 KiB) Viewed 894 times

For the Geocoding API scroll down past the Premium plan web service requests and Premium plan Javascript API requests until you reach the Requests limits shown above, and set them as shown.

The Maps JavaScript API limits are more obvious.

Now your own API Key should work.
Mike Tate ~ researching the Tate and Scott family history.

User avatar
tatewise
Megastar
Posts: 14837
Joined: 25 May 2010 11:00
Family Historian: V6.2
Location: Torbay, Devon, UK
Contact:

Re: Map Life Facts Plugin Error

Postby tatewise » 15 Sep 2018 16:12

I didn't understand why the Google interface you experienced was different, especially as you didn't pinpoint where it differed.
So I tried creating a new Project from scratch, which of course I never need to do, and discovered it has changed.

Google has introduced a Free Trial scheme that changes the Billing dialogues, and if not undertaken, then the Project quotas lead to the error "This page can't load Google Maps correctly. Do you own this web site?" with For development purposes only exactly as you reported.

I've also found the cause of the original Script Error you reported that is due to a change in the way the API Key is copied.

I intend to update the Knowledge Base > Map Life Facts ~ Manage API Key steps, and fix the Plugin to cater for those unexpected changes. Sorry for the delay in discovering these issues, but hope to rectify things as soon as possible.
Mike Tate ~ researching the Tate and Scott family history.

User avatar
BEJ
Gold
Posts: 27
Joined: 10 Sep 2018 17:29
Family Historian: V6.2
Location: Boston, Massachusetts, USA

Re: Map Life Facts Plugin Error

Postby BEJ » 15 Sep 2018 17:48

Glad you identified the issues. I intended to go through the setup process step-by-step and report my experience when I had a few minutes. Now, I await your revisions.

User avatar
tatewise
Megastar
Posts: 14837
Joined: 25 May 2010 11:00
Family Historian: V6.2
Location: Torbay, Devon, UK
Contact:

Re: Map Life Facts Plugin Error

Postby tatewise » 16 Sep 2018 16:37

The Knowledge Base > Map Life Facts ~ Manage API Key steps have been updated with many more screenshots, and the Google Maps Free Trial details added, which is the recent change that upset things.

Please work through the steps to confirm they now match the Google Maps API Key management experience.

Once you have a fully operational API Key, then I will regenerate my API Key, so the one I lent you will cease in 24 hours.

Also attached is Map Life Facts Plugin Version 4.2.2 Date 16 Sep 2018 ZIP file that copes with the problem you originally experienced when copying the API Key. The problem was caused by the copied API Key having an invisible newline character before and after the visible key characters.
[EDIT: Attachment deleted as Plugin V4.5 is in Plugin Store.]

The Map Life Facts Place List folders should be in alphanumerical order, but the Place names within in each folder will still be ordered by their actual leading characters such as , or " etc.
Mike Tate ~ researching the Tate and Scott family history.

User avatar
BEJ
Gold
Posts: 27
Joined: 10 Sep 2018 17:29
Family Historian: V6.2
Location: Boston, Massachusetts, USA

Re: Map Life Facts Plugin Error

Postby BEJ » 17 Sep 2018 14:30

UPDATE: I've spent some time this morning installing the v 4.2.2 plugin, following the new instructions, regenerating my Google API, etc. Unfortunately, Maps JavaScript API and Geocoding API do not appear in the dropdown when I attempt to select API Restrictions. I only have Places as an option (I tried deleting it and no go)---I do recall selecting Places somewhere last week, so I must have created the glitch.

Just wanted you to know that I'm still working on this. I will probably create a new project or a new Google account all together, and get a fresh start when I have a chunk of time available.

User avatar
tatewise
Megastar
Posts: 14837
Joined: 25 May 2010 11:00
Family Historian: V6.2
Location: Torbay, Devon, UK
Contact:

Re: Map Life Facts Plugin Error

Postby tatewise » 17 Sep 2018 15:45

If you visit the Google Cloud Platform Console Dashboard https://console.cloud.google.com/apis/dashboard and click on ENABLE APIS AND SERVICES you should be able to select Maps JavaScript API and Geocoding API under Maps and then choose ENABLE.
You may need to click VIEW ALL (17) on right or use the Search for APIs and Services for Geocoding to see those two API.

This scenario of API not enabled has arisen before, so may need to add the advice above to Knowledge Base .

EnableAPI.png
Dashboard ENABLE APIS AND SERVICES
EnableAPI.png (17.55 KiB) Viewed 737 times
Mike Tate ~ researching the Tate and Scott family history.


Return to “Plugin Discussions”

Who is online

Users browsing this forum: No registered users and 2 guests