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

  • Titel ausblenden
  • Ich brauche dringen Hilfe zu Updates oder ggf. wwie geht Composer?
  • Dynamische Ansicht von Seiteninhalt (als Tabelle?)
  • Vergabe von Berechtigungen für bestimmte Rollen; mir fehlt der Haken bzw. das „Veröffentlicht“
  • Medien und andere Daten mit Feeds von Drupal 7 auf Drupal 10 migrieren
  • Rolle erstellen nicht zu finden
  • für drupal11 ein Slider Modul
  • [gelöst] W3CSS Paragraphs Views
  • Drupal 11 neu aufsetzen und Bereiche aus 10 importieren
  • Wie erlaubt man neuen Benutzern auf die Resetseite zugreifen zu dürfen.
  • [gelöst] Anzeigeformat Text mit Bild in einem Artikel, Drupal 11
  • Social Media Buttons um Insteragram erweitern
Weiter

Neue Kommentare

  • Bitte genauer den aktuellen Lösungs-Ansatz beschreiben
    vor 1 Woche 12 Stunden
  • Git und rsync sind die wichtigsten Werkzeuge
    vor 1 Woche 4 Tagen
  • Arrrrg. Nix Tabelle :-D /*
    vor 5 Wochen 6 Tagen
  • Textboxen mit Tabelle
    vor 5 Wochen 6 Tagen
  • Du sollst ja auch keine
    vor 5 Wochen 6 Tagen
  • Theme
    vor 5 Wochen 6 Tagen
  • Welches Theme benutzt du
    vor 5 Wochen 6 Tagen
  • Mit Responsive Raster hatte
    vor 6 Wochen 9 Stunden
  • Hallo Alex,um das Häkchen
    vor 6 Wochen 17 Stunden
  • Modul view_unpublished
    vor 6 Wochen 1 Tag

Statistik

Beiträge im Forum: 250275
Registrierte User: 20489

Neue User:

  • Robertolix
  • DavidBit
  • JeraldZeF

» Alle User anzeigen

User nach Punkten sortiert:
wla9463
stBorchert6003
quiptime4972
Tobias Bähr4019
bv3924
ronald3857
md3717
Thoor3678
Alexander Langer3416
Exterior2903
» User nach Punkten
Zur Zeit sind 0 User und 11 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