GenoPro Home
GenoPro Home  |  Get Started With My Genealogy Tree  |  Buy  |  Login  |  Privacy  |  Search  |  Site Map
 
Replacement of Google Maps in the Narrative Report


https://support.genopro.com/Topic40986.aspx
Print Topic | Close Window

By genome - Thursday, December 10, 2020
I have become increasing annoyed with the way Google changed its policy a few years back regarding the use of the Google Maps javascript API, forcing anyone who wanted to use it in their projects to give Google their credit card details first, even if their usage was below their free limit.  The Google Cloud platform and Developer's Console were not for the fainted-hearted or in-experienced with the site being a confusing minefield.  It was also difficult to mitigate the risk of unexpected charges from Google by protecting your API key from misuse and to limit usage.

I for one have therefore decided to delete my Google Cloud & API project account to remove this uncertainty from my life.

Over the past week I have been looking into alternatives and can now announce a replacement using the popular LeafletJs javascript library using OpenStreetMap tiles and also two sets of tiles from Stamen. You can choose the initial layer used from these three but the others can be displayed instead via a layer control in the top right corner of the map.

I have attached a zipped Common folder and to try it I suggest you rename your existing Common folder to allow reversion and download and unzip the attached into your GenoPro Report templates folder.

Example images. 

OpenStreetMap

http://support.genopro.com/Uploads/Images/4d8de3a0-fd9f-458b-bce9-9d35.jpg


OpenStreetMap with Stamen 'Terrain' tiles.

http://support.genopro.com/Uploads/Images/056d5a55-9580-45ca-bd93-f8b6.jpg


OpenStreetMap with Stamen WaterColor and Toner-Labels

http://support.genopro.com/Uploads/Images/698b22c4-5099-4edc-9c80-59d0.jpg
By NiKo - Friday, December 11, 2020
Awesome!!!  Thank you so much Genome!!! w00t
By albertsali - Saturday, February 6, 2021

Hallo Ron,

ich habe leider ein paar Probleme mit OpenStreetMap.

OpenStreetMap öffnet Karten immer im Terrain Modus ohne eine Karte zu zeigen. Wie kann man Roads als Voreinstellung einstellen?

In der Personenansicht kann man über den Kartenschalter eine Karte öffnen.

Von einem Text-Hyperlink und aus der Orte-Seite geht dies nicht.

Das Fenster zum umschalten auf Roade-Terrain-Watercolor-Places öffnet sich nicht.


http://support.genopro.com/Uploads/Images/4e464f30-a8e4-41a1-b155-002a.jpg

http://support.genopro.com/Uploads/Images/44d91f0c-6bb5-4ee4-a489-f283.jpg

http://support.genopro.com/Uploads/Images/bc755efa-c546-4be3-9792-d8d7.jpg

http://support.genopro.com/Uploads/Images/08c8d789-9ec3-4fe4-89e2-1493.jpg

By genome - Sunday, February 7, 2021
Hi Albert,

Thanks for testing the new OpenStreetMap for the Narrative Report.

I have found a bug in my script which prevented the layer control button working on the place and individual maps.  I will release revised Report Skin Templates shortly and these will include updated ConfigMsgLocal.xml and Dictionary.xml files for all languages to cater for the substitution of OpenStreetMap/LeafletJs in place of Google Maps.

I have found that the initial zoom setting is too high at 7 and a value of 4 gives better results so I have now made this the default.  This improves the initial terrain view. 

The initial layer type to be displayed is defined in ConfigMsgLocal.xml and can be changed via the Configuration Parameters dialogue as can initial zoom level.

Google translate:

Vielen Dank, dass Sie die neue OpenStreetMap für den Erzählbericht getestet haben.

Ich habe einen Fehler in meinem Skript gefunden, der verhindert hat, dass die Ebenensteuerungsschaltfläche für den Ort und einzelne Karten funktioniert. Ich werde in Kürze überarbeitete Berichts-Skin-Vorlagen veröffentlichen, die aktualisierte ConfigMsgLocal.xml- und Dictionary.xml-Dateien für alle Sprachen enthalten, um die Ersetzung von OpenStreetMap / LeafletJs anstelle von Google Maps zu ermöglichen.

Ich habe festgestellt, dass die anfängliche Zoomeinstellung bei 7 zu hoch ist und ein Wert von 4 bessere Ergebnisse liefert. Daher habe ich dies jetzt zur Standardeinstellung gemacht. Dies verbessert die anfängliche Geländeansicht.

Der anzuzeigende anfängliche Ebenentyp ist in ConfigMsgLocal.xml definiert und kann ebenso wie die anfängliche Zoomstufe über den Dialog Konfigurationsparameter geändert werden.
By albertsali - Sunday, February 7, 2021
sorry, hätte ich auch wissen können!Blush
By genome - Monday, February 8, 2021
This error has now been fixed see 
By NiKo - Wednesday, February 10, 2021
I just downloaded the latest skins, and I still do not see anything when Terrain or Watercolors are selected.  Roads work fine.
By genome - Wednesday, February 10, 2021
Works fine in my neck of the woods (South of England).  May be map tiles are incomplete for some locations.  Any chance of a sample published to familytrees.genopro.com?  or some lat/lang values?
By albertsali - Wednesday, February 10, 2021
Dies ist ein Problem von Google Chrome.

Ich habe meinen freien Stammbaum mit drei Browsern geöffnet:

1. Google Chrome-Browser

http://support.genopro.com/Uploads/Images/84ef3ca6-ef8b-4f01-acf5-eed1.jpg

2. Firefox-Browser

http://support.genopro.com/Uploads/Images/b298ece0-4681-41b3-bec3-5ccc.jpg

3. Opera-Browser

http://support.genopro.com/Uploads/Images/f09672f7-59a8-4f22-bc6b-192c.jpg
By genome - Wednesday, February 10, 2021
Thanks Albert, your post gave me the clue to the problem.  My testing was all on local files but using your web report I could see in the Chrome Developers Console some mismatch between https and http for Stamen map tiles.  I needed to use different Stamen servers.

Amendments to Common\Code\gmap_places.js & Common\Code\gmap_places.htm seem to fix this. see attached
By NiKo - Wednesday, February 10, 2021
The previous versions worked fine on my mobile phone (Samsung Internet), but didn't work with Chrome nor Microsoft Edge.

I replaced the two files you provided, and tried again ... same issue.

I then re-ran the report with the new files (not sure if that makes a difference), and still have the same results.

Not sure if you need it or not, but here are some of the Longs/Lats I am using.  I don't think that's the issue since I can see the terrain in North America and southeast Europe on my phone with no problems.

http://support.genopro.com/Uploads/Images/608f5560-a57f-4fe8-9abe-8045.PNG
By albertsali - Wednesday, February 10, 2021
Läuft BigGrin
By genome - Thursday, February 11, 2021
NiKo, 

I have added your locations to a Harry Potter character and terrain map seems to work(sort of) .  The initial display is zoomed on too far but right clicking on the map and selecting Refresh Frame sorts it.  I will try and fix this

If I zoom around the town of Agrinion then some Stamen tiles are missing at certain zoom levels and this is indicated by error messages on the Developers Console (press F12)

http://support.genopro.com/Uploads/Images/0046b8e4-a44d-4414-a92c-bb98.png


http://support.genopro.com/Uploads/Images/21f9cd3e-a183-4ba2-b6cc-575b.jpg




What errors do you see on the Developers Console for Chrome?
By NiKo - Thursday, February 11, 2021
Thanks, it seems to work fine now on both Chrome and Microsoft Edge.  Some terrain tiles are missing at certain resolutions in North America, as well as part of Europe.

The console errors I get appear to be the same as yours:

http://support.genopro.com/Uploads/Images/0451f66a-9431-4e86-b4bb-f49d.PNG
By appleshaw - Friday, February 12, 2021
https://familytrees.genopro.com/appleshaw/Hayfield/default.htm?page=family_map-fam28283227.htm
In Firefox both versions display but clicking the enlarge icon leads to blank screen
In Chrome the roads display but not the terrain. Enlargement also not working
By genome - Friday, February 12, 2021
Thanks Appleshaw for testing.  I noticed a few things. All Saints Church Glossop does not have any Lat/Lang coordinates set. With Google Maps the script did a place name lookup but I haven't implemented this as yet with Leaflet/OpenStreetMap.  I need to remove the compass icon for places with no Lat/Lang values. Also the tooltip for that icon was wrong.

Your example still has the issue with mixed https/http references (i.e. using initial versions of gmap_places.js/htm) and so this is probably why terrain is not rendering.

I have spent most of today Googling, head scratching and  many trials and tribulations in order to sort out several more issues with location maps.  

I think I have now managed to resolve most if not all of these and so I will release an updated Report Skins package later today.



By appleshaw - Friday, February 12, 2021
Thanks for (usual) quick update. Problems solved. Only thing I have noticed is that the symbol for a map is a pin online but a compass arrow on the PC. Think I can cope with that