GenoPro Home
GenoPro Home  |  Get Started With My Genealogy Tree  |  Buy  |  Login  |  Privacy  |  Search  |  Site Map
 

GenoPro Support Forum




Display of Google Maps

Click to view RSS...
Author
Posted Thursday, August 20, 2020 - Post #40730
Legendary Master

Legendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary Master

Administrators
Customers
Important Contributors
FamilyTrees.GenoPro.com
GenoPro version: 3.1.0.1

Last Login: 2 days ago @ 12:59 PM
Posts: 3,442, Visits: 26,649
Thanks genodarri Smile

I would just like to add that the Google Maps API key can be specified via the Narrative Report Configuration Parameters dialogue instead of via a custom tag.

I'd also like to reinforce the necessity to secure you key by adding HTTP referrer restrictions in the Credentials section for your project on the Google Developers Console to ensure the the key can only be used from web sites thatyou control. 


'lego audio video erro ergo disco' or "I read, I listen, I watch, I make mistakes, therefore I learn"
Posted Thursday, August 20, 2020 - Post #40729
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Forum Members

Last Login: Friday, August 21, 2020
Posts: 1, Visits: 7
I followed genome's instructions and got everything working, I did the following:
And that's it:



Note: Your account must have credit card information or else it wont work. (It will fail to load the map)


Just wanted to validate and thank genome for the solution Smile.

Also, I made a short article on how to deploy your report to Github Pages, you may want to check it out:
Posted Tuesday, May 7, 2019 - Post #39852
Legendary Master

Legendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary Master

Administrators
Customers
Important Contributors
FamilyTrees.GenoPro.com
GenoPro version: 3.1.0.1

Last Login: 2 days ago @ 12:59 PM
Posts: 3,442, Visits: 26,649
I don't think it is necessary to restrict which APIs are used but the only two needed are:

  • Maps Javascript API
  • Geocoding API         (used to attempt tp put a Place on a map when no corodinates are set for it)





'lego audio video erro ergo disco' or "I read, I listen, I watch, I make mistakes, therefore I learn"
Posted Tuesday, May 7, 2019 - Post #39850
Famous Writer

Famous WriterFamous WriterFamous WriterFamous WriterFamous WriterFamous WriterFamous WriterFamous WriterFamous Writer

Customers
GenoPro version: 3.1.0.1

Last Login: 4 hours ago
Posts: 228, Visits: 1,625
Hello

Thanks for your comment.  I changed as you recommended.
What should I choose when Google asks:

"API restrictions

API restrictions specify the enabled APIs that this key can call:

Don't Resctrict key (this key can call any API)

or

Resctrict key"

Now I have Don't Resctict selected?

BR, Jarmo


Posted Monday, May 6, 2019 - Post #39849
Legendary Master

Legendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary Master

Administrators
Customers
Important Contributors
FamilyTrees.GenoPro.com
GenoPro version: 3.1.0.1

Last Login: 2 days ago @ 12:59 PM
Posts: 3,442, Visits: 26,649
The advice given by Google's technial support does not restrict use of your key enough.  As it stands anyone could use your key in their pages on familytrees.genopro.com, should they manage to obtain the key, this is why I advised a more restrictive approach, although your password protection provides extra security here.  

I said:


If you use GenoPro's familytrees site can restrict access so that your key can only be used for your own reports by setting http referrers restriction to
 www.familytrees.genopro.com/your-username/*      e.g. familytrees.genopro.com/genome/*

To allow use on reports generated locally on your PC you can add an http referrer restriction of 
  
__file_url__//path_to_your_reports_folder/*     e.g.       __file_url__//C:/Users/ron/Documents/GenoPro%20Reports/*


and so in your case I suggest you use

familytrees.genopro.com/Jarmo/*

(I have just noticed the error in my earlier post, the www. prefix should be removed, as indicated by the strike-through text above.  N.B. Post has now been corrected)


'lego audio video erro ergo disco' or "I read, I listen, I watch, I make mistakes, therefore I learn"


Edited: Monday, May 6, 2019 by genome
Posted Sunday, May 5, 2019 - Post #39848
Famous Writer

Famous WriterFamous WriterFamous WriterFamous WriterFamous WriterFamous WriterFamous WriterFamous WriterFamous Writer

Customers
GenoPro version: 3.1.0.1

Last Login: 4 hours ago
Posts: 228, Visits: 1,625
Hello

I got API KEY and added it as you described (I think?)in your post.  Then I run "Narrative Report" to check it out but got a message:

"OOP something went wrong.
This page did not load Google Maps correctly. See techical information in JavaScript-konsole."
(this text is translated from finnish!).


Google's technical support  gave me instructions to add in the "Application restrictions" section, on "HTTP referrers", two text strings:

     genopro.com
     *.genopro.com

They said that these two will allow my API key to be used in all subdomains and paths in GenoPro's website.
After doing as they instructed I really was able to Google Maps, so job done (at least so far Smile ).

BR, Jarmo

Edited: Monday, May 6, 2019 by Jarmo
Posted Thursday, April 11, 2019 - Post #39803
Legendary Master

Legendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary Master

Administrators
Customers
Important Contributors
FamilyTrees.GenoPro.com
GenoPro version: 3.1.0.1

Last Login: 2 days ago @ 12:59 PM
Posts: 3,442, Visits: 26,649
I have provided a facility so that users can include their own Google Maps API key in the Narrative Report scripts.

I have updated the attachment  to Updated Report Skins for GenoPro 2018 (2018.10.21) to included these changes.  The Narrative Report skin now looks for a 'Document' Custom Tag named GoogleMapsAPI in the .gno from which the report is being generated and uses the contents of such tag for the Maps API key.  You may optionally provide a 2nd key, GoogleMapsAPIlocal, for use on local reports only, further details given below.  However use of GoogleMapsAPIlocal requires a revised Init.htm skin file, in addition to the 2018.10.21 update above, to replace the one in the Narrative Common\Code report skins folder  (see attached).

Use GenoPro Tools / Tag Editor to create this tag 

http://support.genopro.com/Uploads/Images/eadfc517-1a1b-4df0-b3b0-eb6d.png


and then add your API key under the GenoPro Document Properties dialog.  (to display this dialogue, right-click on an empty area of a genomap and select 'Properties')



http://support.genopro.com/Uploads/Images/58e34603-6f8f-4d71-8f28-3744.jpg


See https://developers.google.com/maps/documentation/javascript/get-api-key for more information pn Google Maps API keys

Google offer a 'free trial' for 12 months where you received $300 worth per month of credit to use the Developer facilities including API keys.

see https://console.cloud.google.com/freetrial

You need to provide credit card details but Google state that they will not take any money until you upgrade from the free trial to a 'billed account.

You must also apply access restrictions to prevent others using you keys on there own sites.  see https://developers.google.com/maps/api-key-best-practices

If you use GenoPro's familytrees site can restrict access so that your key can only be used for your own reports by setting http referrers restriction to

 familytrees.genopro.com/your-username/*      e.g. familytrees.genopro.com/genome/*

To allow use on reports generated locally on your PC you can add an http referrer restriction of 
  
__file_url__//path_to_your_reports_folder/*     e.g.       __file_url__//C:/Users/ron/Documents/GenoPro%20Reports/*

(see https://developers.google.com/maps/documentation/javascript/get-api-key#key-restrictions  )

but for increased security do not use __file_URL__ restriction on your primary API key, only use on the optional 'local' key described above.  This is because the key an be seen by any visitor to the site, and hence there is the possibility for someone to use your key, and therefore your quota, for their own local use. Therefore it is important to keep a key used locally off the internet. For this reason it is recommended you do publish your .gno, .xml or .ged with your tree, and so you need to set these options:

http://support.genopro.com/Uploads/Images/1657ba9c-2099-48fb-aa7e-d5a9.png

It is also advisable to set a quota to minimise any chance of unexpected charges from Google.

The current limit to say within the $300 monthly 'allowance' is 28000 map accesses which equates to a daily quota of approx. 900 maps.


'lego audio video erro ergo disco' or "I read, I listen, I watch, I make mistakes, therefore I learn"


Edited: Sunday, November 29, 2020 by genome
Posted Wednesday, September 5, 2018 - Post #38904
Famous Writer

Famous WriterFamous WriterFamous WriterFamous WriterFamous WriterFamous WriterFamous WriterFamous WriterFamous Writer

Customers
FamilyTrees.GenoPro.com
Important Contributors
Translator
GenoPro version: 3.1.0.1

Last Login: Yesterday @ 8:01 AM
Posts: 214, Visits: 3,624
Thanks for the clear answer.

Regards.



Vittorino Lepore 
"
Se non porti almeno una soluzione, anche tu fai parte del problema" or "If you don't bring at least a solution, even you're a part of the problem"


Edited: Thursday, September 6, 2018 by vlepore
Posted Wednesday, September 5, 2018 - Post #38903
Legendary Master

Legendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary Master

Administrators
Customers
Important Contributors
FamilyTrees.GenoPro.com
GenoPro version: 3.1.0.1

Last Login: 2 days ago @ 12:59 PM
Posts: 3,442, Visits: 26,649
You did nothing wrong and forgot nothing.  I knew this issue was coming at some point. My view is that it is just Google getting more greedy.  Not content with making billions in profits and paying peanuts in corporation tax they want more.  

They announced earlier this year that use of their APIs including Google Maps javascript API would require a registered API key and that the developer owning that key,  i.e. me, would have to enable billing for use of that key. 

There is no way I am giving my credit card to Google to charge me for the use of their Google Maps software, particularly as I have no control over how much it is used, e.g. on familytrees by many GenoPro users.  Google says most small scale usage will not be charged for as they are allowing £200 worth of free usage per month but I cannot afford to take that risk.

I will try adding an API key to the script without enabling Google billing and see what happens.

The alternative is to switch to using Open Street Maps (OSM) which I have looked into previously but will obviously take quite some time to implement.  


'lego audio video erro ergo disco' or "I read, I listen, I watch, I make mistakes, therefore I learn"
Posted Wednesday, September 5, 2018 - Post #38902
Famous Writer

Famous WriterFamous WriterFamous WriterFamous WriterFamous WriterFamous WriterFamous WriterFamous WriterFamous Writer

Customers
FamilyTrees.GenoPro.com
Important Contributors
Translator
GenoPro version: 3.1.0.1

Last Login: Yesterday @ 8:01 AM
Posts: 214, Visits: 3,624
Showing the Google Maps in Narrative Report, this error appears:

"This page can't load Google Maps correctly."

The warning is:

util.js:224 Google Maps JavaScript API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys
Ww.j @ util.js:224
util.js:224 Google Maps JavaScript API warning: SensorNotRequired https://developers.google.com/maps/documentation/javascript/error-messages#sensor-not-required

The report is on http://familytrees.genopro.com

What am I wrong or what did I forget?
Thank you


Vittorino Lepore 
"
Se non porti almeno una soluzione, anche tu fai parte del problema" or "If you don't bring at least a solution, even you're a part of the problem"


Similar Topics

Click to view RSS...
Expand / Collapse

Reading This Topic

Expand / Collapse
Active: 2 - 1 guest, 0 members, 0 anonymous.
Refresh
No members currently viewing this topic!