Hallo, Gast! (Registrieren)

Letzte Ankündigung: MyBB 1.8.37 veröffentlicht (04.11.23)


Benutzer, die gerade dieses Thema anschauen: 1 Gast/Gäste
Google Maps Usermap
#1
Eine neue Erweiterung wurde veröffentlicht: Google Maps Usermap

Zitat:/***************************************************************************
*
*   Usermap-system for MyBB
*   Copyright: © 2008-2013 Online - Urbanus / Website: http://www.Online-Urbanus.be
*
*   Copyright: © 2016 Jockl
*   http://forum.mybboard.de/user-2693.html
*
*   Copyright: © 2019 itsmeJAY
*   https://www.mybb.de/forum/user-10220.html
*
***************************************************************************/


English

Usermap is a plugin which add a map where your user can pin their location on using Google Maps.

Usermap is using Google Maps. To use the usermap, you have to generate a Google-Maps JavaScript Maps API Key, Geocoding API Key and Elevation API Key and have to accept the Google-Maps-API terms. 

   • You can choose if a link to the user location will be shown on the member profile or in the postbit. None of those links can bee seen by guests
   • Each user can delete his own PIN in the usermap
   • Admins can delete the PIN of a user in the ACP at the user account settings
   • If you need to show some additional locations beside the users, you are now able to put those in the plugin settings
       ◦ You can decide if guests can see those locations
       ◦ The Google Maps nfo-Pin is set as default. You can choose your own Pin image in the ACP
   • You can choose if the elevation of a user location will be shown in the user avatars of the usermap (settings in Meter or Feet are possible)
   • The language of the Google Map changes according the language settings of the MyBB board and can display German and English language
   • Adapt the plugin settings

You will find English and German language files included (translations done by BeeJayZZR and Gerti).

Read the README file for installation and upgrade instructions

Installation instructions:
   • upload all files and folders to the root-folder of your MyBB board
   • Activate & install the plugin
   • Get a Google Maps API key
   • Adapt the plugin settings
     
A little tip:

I have added one field per function (key) in the ACP. Theoretically one key could be set for all 3 APIs (without restrictions).  However, you should restrict your keys so that other users cannot use your keys.  For example, it is recommended to create a key only for the JavaScript Maps API and restrict it via HTTPS (your domain). The geocoding key would have to be restricted by your web server's IP address. This conflicts because Google only allows one restriction per key. Get a little involved with the Google Maps API and you'll quickly see the advantage. Have fun! The plugin comes today or tomorrow.

Deutsch:

Usermap ist ein Plugin für das MyBB, welches eine Karte hinzufügt, auf der User anhand eines Pin´s / Fähnchens ihren Wohnort kennzeichnen können. Usermap nutzt derzeit Google Maps. 
Um die Usermap verwenden zu können, musst Du einen JavaScript Google Maps API Key generieren und die Nutzungsbedingungen der Google-Maps-API akzeptieren. Es wird ebenfalls für die Ermittlung bestimmter Standorte der Geocoding API Key benötigt und zum berechnen der Höhe des Wohnorts der Elevation Key.

   • Ein Link zum Wohnort eines User kann nun sowohl im Profil als auch im Postbit über das ACP eingestellt werden. Beides ist aber für Gäste nicht sichtbar.
   • Ein User kann jetzt seinen eigenen PIN in der Usermap löschen
   • Ein Admin kann im ACP unter den Account-Einstellungen eines Users ebenfalls den PIN löschen
   • Neben den User Pins können nun auch wahlweise zusätzliche Orte im ACP eingestellt werden.
       ◦ Man kann entscheiden, ob Gäste diese Plätze sehen können oder nicht.
       ◦ Als Standard ist das Google Maps Info-Pin gesetzt. Man kann aber auch ein eigenes PIN-Bild vergeben.
   • Man kann auswählen, ob bei den Usern in der Usermap die Höhe eines Ortes angegeben werden soll. Angabe wahlweise in "Meter" oder "Feet" möglich.
   • Die sprachliche Darstellung der Google Map orientiert sich nach der eingestellten Forensprache und unterscheidet zwischen Deutsch und Englisch

Dem Plugin liegen die englischen aber auch deutschen Sprachpakete bei (Übersetzungen von BeeJayZZR und Gerti). 

Lesen Sie die README-Datei für die Installation und Upgrade-Anweisungen

Installation:
   • Lade alle Dateien in das root-Verzeichnis Deines MyBB-Forums
   • Aktiviere das Plugin im ACP
   • Hole Dir den Google Maps API Schlüssel inkl. Geocoding Key und Elevation Key
   • Füge alle Schlüssel in den Usermap-Einstellungen im ACP ein
   • Nehme entsprechende Einstellungen im Plugin vor
     
Ein kleiner Hinweis:

Ich habe pro Funktion (Schlüssel) ein Feld im ACP hinzugefügt. Theoretisch könnte ein Schlüssel für alle 3 APIs eingestellt werden (ohne Einschränkungen). Allerdings solltet ihr eure Schlüssel einschränken, damit andere Benutzer eure Schlüssel nicht verwenden können. Es empfiehlt sich bspw. ein Schlüssel nur für die JavaScript Maps API zu erstellen und per HTTPS (eure Domain) einzuschränken. Den Geocoding-Schlüssel müsste über IP-Adresse von eurem Webserver eingeschränkt werden. Dies steht im Konflikt zueinander weil Google nur eine Beschränkung pro Schlüssel zulässt. Beschäftigt euch ein wenig mit Google-Maps-API und ihr werdet den Vorteil schnell feststellen. Viel Spaß! Das Plugin kommt heute oder morgen.
Zitieren
#2
Da sich ja jetzt einige in das plugin eingearbeitet haben, hätte ich die Frage ob man auch irgendwie Marker Cluster verwenden kann speziell für hinzugefügte Orte.
Zitieren
#3
(15.04.2019, 15:45)lenox schrieb: Da sich ja jetzt einige in das plugin eingearbeitet haben, hätte ich die Frage ob man auch irgendwie Marker Cluster verwenden kann speziell für hinzugefügte Orte.
Ich geeh mal davon aus, Du meinst mit "Marker Cluster" PINs! ("Marker Cluster" wird im PlugIn nirgend erwähnt) Du kannst im ACP die eigenen Orte selbst definieren und hierfür einen eigenen PIN einpflegen. Auch kanns Du die PINs name_des_pin.png selbst durch eigene Grafiken ersetzen. Sollte ich etwas missverstanden haben, spezifiziere bitte Deine Frage.
Sollte ich der Ansicht sein helfen zu können biete ich Hilfe(n) an!  ...ich bitte jedoch nicht darum helfen zu dürfen!
Tools [Unixzeit ⇔ Realzeit] ♦ [BOM-Finder] ♦ [SQL-Prefix-Changer] ♦ [USV-Rechner] ♦ [PlugIns]
Zitieren
#4
Hallo lenox,

lege dazu in /images/pinimgs ein eigenes Pin-Img ab.
In den Usermap-Einstellungen unter "Du kannst Dein eigenes PIN-Bild verwenden" trägst Du nur den Namen es Bildes ein (z.B. "mein_pin.png").
Dieses Image gilt nur für die zusätzlichen Orte.

Im Feld für zusätzliche Orte trägst Du Deine Daten z.B. nach folgendem Muster ein:

Code:
['<b>Titel<br /><span style="color:#0000FF;">Ort</span></b>', 52.872143, 12.661099, 1]
Zitieren
#5
Das mit den eigenen Icons für pins ist mir klar, darum geht es auch nicht, ich würde diese gerne als marker Cluster anzeigen lassen wollen. Glaube ihr verwechselt pins mit cluster https://developers.google.com/maps/docum...clustering
Zitieren
#6
Danke, jetzt hab ich`s begriffen. Wink 
Das wäre wohl was für die nächste Ausbaustufe des Plugin.
Zitieren
#7
Ich habe die Usermap nun geupdatet. Bis dato (von Jockl oder dem Vorgänger programmiert):

Wenn "Höhe anzeigen" im ACP aktiviert war und die Benutzerkarte aufgerufen wurde, wurde pro Benutzer jeweils 1 Request an Google gestellt. Die Ladezeit war enorm hoch bei vielen Benutzern. Zusätzlich steigen so die Kosten bei Google. 

Ich habe nun folgendes umprogrammiert in Version 1.5.0:
Wenn ein Benutzer ein PIN setzt, wird einmalig eine Anfrage an Google gesendet und die Höhenwerte in die Datenbank geschrieben. Bei Aufruf der Benutzerkarte, werden alle Höhenwerte der Benutzer aus der Datenbank geholt. Spart Traffic (= Kosten) und die Ladezeit ist wieder in Ordnung.
Zitieren
#8
Hello ... 
Firstly many thanks for updating and publishing this plugin ...

You can confirm the syntax is correct in the upgrade

This command = 

INSERT INTO mybb_settings (name, title, description, optionscode, value, disporder, gid, isdefault)

VALUES ('usermap_apikeythree', 'API key for elevation', 'The required API key (for the

Elevation') must be generated in a GoogleMaps account. Informationen über die reference is

<a "https://developers.google.com/maps/documentation/javascript/get-api-key"
target = "_ blank"> find here code, text '', 0, ' 2 ',' GID ',' 0 ');



Appears to have an un-needed ' in the line ' The required API key (for elevation ')    Removing the last ' Appears to reslove the error?

However, I still see an error when attempting to use the new application,  while the elevation is showing the attached error.


I'm running MYBB 1820 and the 1.5.0 release of this plugin 

Many thanks in advance ..
Ian
 


Angehängte Dateien Thumbnail(s)
   
Zitieren
#9
Hello,

with the new update a new database field was added to save traffic and improve the loading time significantly. Are you already using the plugin or are you using it for the first time (First Installation)?
Have users already registered in the Usermap?
Zitieren
#10
Hello .. 

Yes it was installed and working before - the location look up had stopped but I now know this was due to the Google API change ... 

The address lookup is working correctly now, but the problem with the elevation field stops the PIN from being added or changed, this is the case with and without the field set to YES/NO and the API key been added or not .. 

The error appears to suggest the DB does not know what to do with the supplied data and show the error as seen .. 

If you need any more info please let me know - but thanks for responding to this .. 

Kind Regards

Ian
Zitieren