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 - 11: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

  • 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
  • Nach Installation der neuesten D10-Version kein Zugriff auf Website
  • Composer nach Umzug
  • [gelöst] Taxonomie Begriffe zeigt nicht alle Nodes an
  • Drupal 11 + Experience Builder (Canvas) + Layout Builder
  • Welche KI verwendet ihr?
  • Update Manger läst sich nicht Installieren
Weiter

Neue Kommentare

  • melde mich mal wieder, da ich
    vor 1 Tag 14 Stunden
  • Hey danke
    vor 2 Tagen 8 Stunden
  • Update: jetzt gibt's ein
    vor 3 Tagen 2 Stunden
  • Hallo, im Prinzip habe ich
    vor 1 Woche 12 Stunden
  • Da scheint die Terminologie
    vor 1 Woche 15 Stunden
  • Kannst doch auch alles direkt
    vor 1 Woche 4 Tagen
  • In der entsprechenden View
    vor 1 Woche 4 Tagen
  • Dazu müsstest Du vermutlich
    vor 1 Woche 4 Tagen
  • gelöst
    vor 4 Wochen 1 Tag
  • Ja natürlich. Dass ist etwas,
    vor 4 Wochen 2 Tagen

Statistik

Beiträge im Forum: 250233
Registrierte User: 20449

Neue User:

  • Mroppoofpaync
  • 4aficiona2
  • AppBuilder

» Alle User anzeigen

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