Jump to content
TNG Community
XerxX

Replacing Google Maps with OSM

Recommended Posts

tngrlkrz

Ditto here...Google NoGo today.  OSM activated.  Many thanks to Erik for giving us an alternative.

Ron

Share this post


Link to post
Share on other sites
XerxX

Del,

 

I can post a - I believe - not working (=new beta) version for TNG10 later today.

The reason that I don't know if it works, is that I don't have a TNG10 environment any more.

If you or someone is capable of making it work: Please do it and post it. But the poster also has to take care of the ModSupport as I can't.

The beta mod is the same as the TNG11 version of the mod excluding anything Heatmap, as they didn't exist before TNG11.

 

I'm working on it,

Erik

 

EDIT: It is posted now.

https://tng.lythgoes.net/wiki/index.php?title=OpenStreetMap

Edited by XerxX
Mod is posted

Share this post


Link to post
Share on other sites
Newfloridian

I would be interested in such a facility as a backup. As of this moment my maps are still working. I'm using TNG10.1.3 with PHP manually edited for version 7.2 I only occasionally use Mod Manager but have never used it for coding.

Alan

 

Share this post


Link to post
Share on other sites
XerxX

Del, Please re-read all of my today post above.

/Erik

Share this post


Link to post
Share on other sites
Ken Roy
8 hours ago, DelG said:

Erik - tried to install v.10 beta but mod manager says cannot install.

Del,

If the Mod Manager indicates cannot install, you need to expand the status column and provide the lines that show an error

Share this post


Link to post
Share on other sites
Ken Roy
On 8/17/2018 at 4:16 PM, tngrlkrz said:

Ditto here...Google NoGo today.  OSM activated.  Many thanks to Erik for giving us an alternative.

Ron,

Just curious.  Did you have an API key or were you running with the fake key of "1"?

Share this post


Link to post
Share on other sites
DelG
15 minutes ago, Ken Roy said:

If the Mod Manager indicates cannot install, you need to expand the status column and provide the lines that show an error

Ken,

I had been refraining from upgrading from v.10 because of the Google maps issue - now there is no reason not to upgrade to TNG v11 or 12 so is really a moot issue. I imagine there is some conflict with one of the many mods I have installed but now not worth chasing. Thanks.

Del

Share this post


Link to post
Share on other sites
Ken Roy

Except that Erik is trying to provide the mod to TNG v10 users without having a TNG v10 envionrment, so it might be helpful to know why the mod will not install

Share this post


Link to post
Share on other sites
DelG
17 minutes ago, Ken Roy said:

Except that Erik is trying to provide the mod to TNG v10 users without having a TNG v10 envionrment, so it might be helpful to know why the mod will not install

Ok - see attached and errors pasted below:

wiki16.png
cannot install
 

This mod may NOT WORK as is!
This mod creates OSM maps if you have no GoogleMap API key.
Note the Edit Options after install.

Changes in this version:
- MouseWheel Zoom is OFF by default. Added to MM Edit options - Sugg. by Steven Davis
- Eight new maps added for selection via MM Edit options - Sugg. by Katryne

If you want this mod to be included in TNG: Please tell Darrin.

Author: Erik Hoppe User: XerxX

Please report errors using the Mod Support link at the Wiki page.
Please report success by adding to the Site list at the Wiki page.
Thank You,
Erik


line 31: %copyfile:OpenStreetMap.3/osmmaplib.php not copied
line 32: %copyfile:OpenStreetMap.3/osmmaplib2.php not copied
line 33: %copyfile:OpenStreetMap.3/osmmapdrawthemap.php not copied
line 34: %copyfile:OpenStreetMap.3/osm_settings.php not copied
line 35: %copyfile:OpenStreetMap.3/osmmapswitch.js not copied
line 36: %copyfile2:OpenStreetMap.3/ol.css:css/ol.css not copied
line 37: %copyfile2:OpenStreetMap.3/ol-geocoder.min.css:css/ol-geocoder.min.css not copied
line 38: %copyfile2:OpenStreetMap.3/ol-popup.css:css/ol-popup.css not copied
line 39: %copyfile2:OpenStreetMap.3/ol.js:js/ol.js not copied
line 40: %copyfile2:OpenStreetMap.3/ol-geocoder.js:js/ol-geocoder.js not copied
line 41: %copyfile2:OpenStreetMap.3/ol-popup.js:js/ol-popup.js not copied
line 42: %copyfile2:OpenStreetMap.3/osmpin.png:img/osmpin.png not copied
line 50: %target:genlib.php
line 51: %location:% not installed
line 66: %location:% not installed
line 81: %location:% not installed
line 102: %target:personlib.php
line 103: %location:% not installed
line 124: %target:admin_editplace.php
line 125: %location:% Bad target
line 152: %location:% not installed
line 175: %location:% not installed
line 190: %location:% not installed
line 211: %location:% not installed
line 243: %location:% not installed
line 269: %target:admin_editmedia.php
line 270: %location:% Bad target
line 297: %location:% not installed
line 331: %location:% not installed
line 363: %location:% not installed
line 391: %target:admin_newplace.php
line 392: %location:% Bad target
line 419: %location:% not installed
line 435: %location:% not installed
line 457: %location:% not installed
line 472: %location:% not installed
line 505: %location:% not installed
line 531: %target:admin_editcemetery.php
line 532: %location:% Bad target
line 559: %location:% not installed
line 582: %location:% not installed
line 597: %location:% not installed
line 629: %location:% not installed
line 657: %target:admin_newcemetery.php
line 658: %location:% Bad target
line 685: %location:% not installed
line 707: %location:% not installed
line 722: %location:% not installed
line 755: %location:% not installed
line 783: %target:admin_places.php
line 784: %location:% not installed
line 800: %location:% not installed
line 823: %location:% not installed
line 846: %location:% not installed
line 863: %location:% not installed
line 888: %target:getperson.php
line 889: %location:% not installed
line 904: %location:% not installed
line 919: %location:% not installed
line 935: %location:% not installed
line 950: %location:% not installed
line 967: %location:% not installed
line 984: %location:% not installed
line 1001: %location:% not installed
line 1018: %location:% not installed
line 1042: %target:placesearch.php
line 1043: %location:% not installed
line 1059: %location:% not installed
line 1074: %location:% not installed
line 1097: %target:headstones.php
line 1098: %location:% not installed
line 1114: %location:% Bad target
line 1140: %target:showmap.php
line 1141: %location:% not installed
line 1160: %location:% not installed
line 1176: %location:% Bad target
line 1202: %target:osm_settings.php% file missing (optional) will ignore


  • code modifications specified: 52; modified: 0
  • file copies specified: 12; copied: 0
  • new files specified: 0; created: 0
  • errors: 7

Mod Manager - installed mods etc.png

Share this post


Link to post
Share on other sites
bhemph

The line of code for the first set of bad targets should be:

echo "<script type=\"text/javascript\" src=\"{$http}://maps.googleapis.com/maps/api/js?sensor=false&amp;language={$text['glang']}\"></script>\n";

The line of code for the last two bad targets should be:

echo "<div id=\"map\" style=\"width: {$map['hstw']}; height: {$map['hsth']};margin-bottom:20px;\" class=\"rounded10\"></div>\n";


So those few changes should make it installable for TNG 10.1.

Share this post


Link to post
Share on other sites
tngrlkrz
2 hours ago, Ken Roy said:

Ron,

Just curious.  Did you have an API key or were you running with the fake key of "1"? 

Ken,

Have only had the fake key '1' . 

Ron

Share this post


Link to post
Share on other sites
Ken Roy

Thanks Ron,

Well Google started requiring an API key in June 2016.  I obtained a key back in TNG v11 and it appears to be still working even though I have not added a credit card to my account.

My understanding though is that you can no longer acquire a key without providing a credit card when registering.

Share this post


Link to post
Share on other sites
manofmull

Del / Ron

Sorry to hear you've been "googled" map-wise.

Mine are still working 100% with map key "1" TNG11.1.2

No doubt they'll get me eventually

 

M

 

Share this post


Link to post
Share on other sites
manofmull

I have to report it finally happened today : I've been "googled" map-wise.

I've installed Erik's OSM (great job).

Although I miss the geocode tab (still there in merge), googlemaps geocoded incorrectly half of the time anyway.

So for now, I have to geocode manually which is a pain. I trust this will be fixed for auto-geocoding in future ?

 

Michael

Share this post


Link to post
Share on other sites
XerxX

Hi Michael, that's too bad. But expected :(

Yes the Merge >> Geocode tab may still work, but for the future...

I have been in contact with a "geocode supplier" (MapQuest) with free accounts (a key is still needed) who informed me by mail that the geocode data is their property and mustn't be stored and may only be displayed when using their maps - except if you use a paid account. So in reality; bulk geocoding requires you to pay.

This was not clear in the TOS so to be sure, I mailed them.

If you or anyone finds a "geocode supplier" with a free account, allowing bulk geocoding w/o any special terms (= a totally new map mod) please let me know and I will see what I can do. (Remember to really scrutinize the TOS...) Need of a key is okay as it can be a MM Edit option.

Personally, I agree with you in that one has to check and do too many corrections afterwards. I rarely use it.

 

Best regards,

Erik

PS. If you haven't already: Please add your site to the list "Sites Using This Mod":

https://tng.lythgoes.net/wiki/index.php?title=OpenStreetMap#Sites_using_this_mod

Thank You.

Share this post


Link to post
Share on other sites
cfj

Hi Erik.
For a while back Google Webmaster Tools reports I have duplicate meta titles and duplicate meta descriptions

I have changed this line:

$headline = $text['placelist'] . " | " . $text['heatmap']; 

My version

$headline = $text['placelist'] . " | " . $text['heatmap'] . " | " . $psearch;

 

When I added $psearch, I get dynamic meta titles and meta descriptions

Don't know if Google accept this!!!

Share this post


Link to post
Share on other sites
XerxX

You have to tell Darrin about this as that is part of the original TNG code that I simply copied to make everything the same except for the map itself.

Thanks anyway!

Erik

Share this post


Link to post
Share on other sites
Katryne

Hello !

I have been  using OSM for some months now. And I do not meet a lot of issues with geocoding  I had once Algiers located in the middle of Pacific, but maybe there is an islet named this way there. What surprises me is that when I launch the geocoding tab, very few new places are geocoded. Not because it is not found, but because of a mystery I cannot understand : it looks like some locations I have never used before are correctly geocoded, just after I enter them, without my having to use the automatic geocoding feature or choosing myselp the place on the map.

Share this post


Link to post
Share on other sites
cfj
9 minutes ago, XerxX said:

You have to tell Darrin about this as that is part of the original TNG code that I simply copied to make everything the same except for the map itself.

I will send him an email.

I have changed the title in heatmap_OSM

Thanks for your fast reply.

Share this post


Link to post
Share on other sites
cfj
On 8/22/2018 at 2:25 PM, cfj said:

Hi Erik.
For a while back Google Webmaster Tools reports I have duplicate meta titles and duplicate meta descriptions

I have changed this line:


$headline = $text['placelist'] . " | " . $text['heatmap']; 

My version


$headline = $text['placelist'] . " | " . $text['heatmap'] . " | " . $psearch;

 

When I added $psearch, I get dynamic meta titles and meta descriptions

Don't know if Google accept this!!!

On 8/22/2018 at 2:32 PM, XerxX said:

You have to tell Darrin about this as that is part of the original TNG code that I simply copied to make everything the same except for the map itself.

I will send him an email.

I have changed the title in heatmap_OSM

Thanks for your fast reply.

I sent Darrin some of my suggestions regarding the heatmap.

Here is Darrin's answer:

Quote

Thanks Cathrin. I will include that change in the standard heatmap.php file in the next update.

Darrin

Erik, maybe you also will change your OSM mod, when (if) Darrin change the heatmap!

Share this post


Link to post
Share on other sites
XerxX

@Katryne, Thanks.

The "Nomatime" is OSM's geocoding service and shall not be used for bulk coding (it's somewhere in some TOS).

The "OpenCage"'s free account limit is 2,500 questions a day AND max 1 question/second. That time-limit is an obstacle.

 

@cfj, Sure can do. Is this the only modification? Otherwise: Please mail me all changes, like above with "before and after".

 

All good to all of you!

Erik

Share this post


Link to post
Share on other sites
cfj
39 minutes ago, XerxX said:

@cfj, Sure can do. Is this the only modification? Otherwise: Please mail me all changes, like above with "before and after".

Mail sent

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×