Startseite
  • » Home
  • » Handbuch & FAQ
  • » Forum
  • » Übersetzungsserver
  • » Suche
Startseite › Forum › Drupalcenter.de › Module ›

Location-Module, Umkreissuche (Proximity Search), PLZ Problem

Eingetragen von cedrix (28)
am 19.02.2009 - 12:19 Uhr in
  • Module
  • Drupal 6.x

Hallo,

ich nutze Druapl 6 mit Locations und Gmap. Habe die Module installiert und auch die Datenbank mit den PLZ gefüttert. Habe nach dieser Anleitung (http://drupal.org/node/359463) alles erledigt. Ich habe zwei Nodes mit Location-Settings, diese werden in GMap auch korrekt angezeigt. In den nodes sind Lat/Longitude gespeichert. Das Problem ist, dass eine Suche nach PLZ nicht funktioniert.

Ich habe eine View/Ansich erstellt mit einem Proximity-Filter (exposed, also einstellbar für Benutzer). Trägt man einen "Standort" im Format Latitude/Longitude ein, un wählt z.B. 200km Umkreis aus, findet er die entsprechende Node. Wählt man als Standort die Eingabe über PLZ, erhält man ein leeres Ergebnis.

Das Ergebnis mit Latitude/Longitude funktioniert und sieht im Vorschau-Modus so aus:

Zitat:

Textkörper:

Jop 1
Distance / Proximity: 170.24 km
Textkörper:

Jop 2
Distance / Proximity: 171.99 km
Abfrage

SELECT node.nid AS nid,
   node_revisions.body AS node_revisions_body,
   node_revisions.format AS node_revisions_format,
   (IFNULL(ACOS(0.601630442741*COS(RADIANS(location.latitude))*(0.988022017143*COS(RADIANS(location.longitude)) + 0.154312973013*SIN(RADIANS(location.longitude))) + 0.798774567927*SIN(RADIANS(location.latitude))), 0.00000)*6364467.83762) AS location_distance
FROM node node
LEFT JOIN location_instance location_instance ON node.vid = location_instance.vid
LEFT JOIN location location ON location_instance.lid = location.lid
LEFT JOIN node_revisions node_revisions ON node.vid = node_revisions.vid
WHERE (location.latitude > 44.0107947979 AND location.latitude < 62.0156872649 AND location.longitude > -6.19830854786 AND location.longitude < 23.9522147979) AND ((IFNULL(ACOS(0.601630442741*COS(RADIANS(location.latitude))*(0.988022017143*COS(RADIANS(location.longitude)) + 0.154312973013*SIN(RADIANS(location.longitude))) + 0.798774567927*SIN(RADIANS(location.latitude))), 0.00000)*6364467.83762) < 1000000) AND (node.type in ('neutest'))

Die gleiche Abfrage mit Eingabe einer PLZ sieht so aus:

Abfrage

SELECT node.nid AS nid,
   node_revisions.body AS node_revisions_body,
   node_revisions.format AS node_revisions_format,
   'Unknown' AS location_distance
FROM node node
LEFT JOIN node_revisions node_revisions ON node.vid = node_revisions.vid
LEFT JOIN location_instance location_instance ON node.vid = location_instance.vid
LEFT JOIN location location ON location_instance.lid = location.lid
WHERE (0) AND (node.type in ('neutest'))

und liefert ein leeres Ergebnis.

Irgendwie werden PLZ nicht in Longitude/Latitude-Werte gewandelt, oder?!

Kann mir jemand sagen, wie die PLZ Proximity-Suche klappt oder wenn es einer geschafft hat, wie es geht?!

Danke im Voraus!

Cedrix

‹ Kurze Frage zu Webforms Form - Webform $form_state value ändern klappt nicht! ›
  • Anmelden oder Registrieren um Kommentare zu schreiben

Benutzeranmeldung

  • Registrieren
  • Neues Passwort anfordern

Aktive Forenthemen

  • Entity Reference - Title Felder werden als Link angezeigt
  • PHP 8.1 - Deprecated function: rtrim()
  • Preloader / Spnner entfernen Menu Link Modal-Modul
  • Schriftgröße standard einstellen
  • Drupal Website gestalten
  • MariaDB 10.6
  • Tokens werden in Viev als Link angezeigt
  • [bug entdeckt & workaround gefunden] benutzerdefinierte Felder vom Userprofil tauchen ungefragt auch in den Forumtopics auf...
  • [gelöst] Mass contact Empfängerliste nach Taxonomy Term statt Rolle
  • Update V. 9.3.12 auf V. 9.4 mit Fehler: Modul mySQL fehlt. Bitte Hilfe.
  • Sprachpfad, in Drupal Korrekt einstellen, auch bei den Meta-Tags
  • Update von Drupal 9.3 auf 9.4 oder bei 9.3 bleiben
Weiter

Neue Kommentare

  • Es ist ein Paragraph
    vor 2 Stunden 8 Minuten
  • Danke fürs Feedback. Gut dass
    vor 2 Tagen 18 Stunden
  • Patch angewandt
    vor 2 Tagen 21 Stunden
  • core_version_requirement: ^8
    vor 4 Tagen 23 Stunden
  • core_version_requirement: ^8
    vor 4 Tagen 23 Stunden
  • ok. Wenn ich das mache
    vor 4 Tagen 23 Stunden
  • Bei gleichem Namen hat das
    vor 5 Tagen 38 Sekunden
  • Sorry, dass ich mich hier
    vor 5 Tagen 12 Minuten
  • Habe Patch versucht
    vor 5 Tagen 7 Stunden
  • Hier wird ein Patsch
    vor 5 Tagen 9 Stunden

Statistik

Beiträge im Forum: 247867
Registrierte User: 19592

Neue User:

  • Davidsnins
  • kudes
  • Tkakah

» Alle User anzeigen

User nach Punkten sortiert:
wla9213
stBorchert6003
quiptime4972
Tobias Bähr4019
bv3924
ronald3845
md3717
Thoor3678
Alexander Langer3416
Exterior2903
» User nach Punkten
Zur Zeit sind 0 User und 7 Gäste online.

Hauptmenü

  • » Home
  • » Handbuch & FAQ
  • » Forum
  • » Übersetzungsserver
  • » Suche

Quicklinks I

  • Infos
  • Drupal Showcase
  • Installation
  • Update
  • Forum
  • Team
  • Verhaltensregeln

Quicklinks II

  • Drupal Jobs
  • FAQ
  • Drupal-Kochbuch
  • Best Practice - Drupal Sites - Guidelines
  • Drupal How To's

Quicklinks III

  • Tipps & Tricks
  • Drupal Theme System
  • Theme Handbuch
  • Leitfaden zur Entwicklung von Modulen

RSS & Twitter

  • Drupal Planet deutsch
  • RSS Feed News
  • RSS Feed Planet
  • Twitter Drupalcenter
Drupalcenter Team | Impressum & Datenschutz | Kontakt
Angetrieben von Drupal | Drupal is a registered trademark of Dries Buytaert.
Drupal Initiative - Drupal Association