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

  • Neuinstallation: vermutlich ein rewrite-Problem
  • Drupal CMS installieren
  • [erledigt]MP3 in Drupal 10 einbinden
  • (gelöst)Drupal 11 installieren
  • 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
Weiter

Neue Kommentare

  • Was für einen Server benutzt
    vor 1 Woche 1 Tag
  • Wenn die Subdomain auf
    vor 1 Woche 3 Tagen
  • ordnerstruktur
    vor 1 Woche 3 Tagen
  • Die Subdomain muß auf den
    vor 1 Woche 6 Tagen
  • Verwende doch das Tag dafür,
    vor 5 Wochen 21 Stunden
  • Guckst du hier: step by step
    vor 5 Wochen 11 Stunden
  • Guckst du hier: step by step
    vor 5 Wochen 11 Stunden
  • Ich habe ja keine Angst vor
    vor 6 Wochen 2 Tagen
  • Ist grundsätzlichmachbar – aber nichts für „einfach mal schnell“
    vor 6 Wochen 5 Tagen
  • Vielen Dank erst einmal, aber
    vor 6 Wochen 6 Tagen

Statistik

Beiträge im Forum: 250289
Registrierte User: 20517

Neue User:

  • Wolf Dab
  • Scottteday
  • MichaelPeeno

» Alle User anzeigen

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