1

We are using the add-on on a German site using the following code to fetch results within 50km of the town/city or postcode searched;

{exp:gmap:search
    cache_post="false"
    channel="salons_de"
    latitude_field="cf_salons_de_latitude"
    longitude_field="cf_salons_de_longitude"
    distance_field="distance_max"
    metric="kilometers"
}
    <div class="txt"  style="float:left; margin-right:30px;">
        <input type="text" name="location" value="{if post:location}{post:location}{/if}" placeholder="Stadt oder Postleitzahl eingeben" />
        <input type="hidden" name="status" value="open" />
        <input type="hidden" name="distance_max" value="50" />
    </div>

    <input class="viewbtn3" style="float:left;" value="Suchen" type="submit">
{/exp:gmap:search}

However, it’s not returning results for 'some' zipcodes, even though I’m searching for the exact zipcode entered for an entry.

Wondered if anyone else has had experience with this? :)

Thanks.

1

Just to point others in the right direction, I answers this question on Devotee. http://devot-ee.com/add-ons/support/google-maps/viewthread/9952

From Devotee:

I am away from my computer traveling to PeersConf this week. I will get back with in detail when I can but essentially you need to geocode two fields. 1) being the zip code 2) a hidden field with “, Germany” hardcoded. This will ensure all the geocoder requests are applicable to Germany.

| improve this answer | |
  • Oops, sorry I forgot to update this one as well. As you will see from the link that Justin shared, I replied to confirm the solution working. :) – doubleplusgood Jul 3 '13 at 14:15
  • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. – Tom Davies Jul 4 '13 at 10:02
  • Hey Tom. A little confused - it was my question initially. I marked Justin's reply above as the answer. :) – doubleplusgood Jul 8 '13 at 12:43
  • What Tom meant is you were correct to mark Justin's answer as accepted, but no need to post a new "answer" saying that. I've converted your answer into a comment to make it clear you support this answer :) – Adrian Macneil Jul 19 '13 at 11:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.