We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

New Module: Geofinder - Location based searching for weblog entries and members

Development and Programming

ErniePile's avatar
ErniePile
20 posts
16 years ago
ErniePile's avatar ErniePile

Thank you so much for the information – Geofinder is going to suit our immediate needs, but knowing that you’d be able to extend it in the future, if we do end up needing that, is great.

Thanks Jason!

       
Jason Ferrell's avatar
Jason Ferrell
33 posts
16 years ago
Jason Ferrell's avatar Jason Ferrell
Thank you so much for the information – Geofinder is going to suit our immediate needs, but knowing that you’d be able to extend it in the future, if we do end up needing that, is great. Thanks Jason!

You are very welcome, glad to assist.

       
H&O's avatar
H&O
34 posts
16 years ago
H&O's avatar H&O
Hi - Thanks for giving Geofinder a look.
- Does the module allow for a more advanced search with additional parameters – say, filtering by custom member fields? (We saw that custom fields could be displayed in the results, but weren’t sure if they could be included as additional search parameters.) For example, we’d like to do a store locator, but allow people to do a search with not only zip code, but also choose if they’re interested in stores with “wi-fi” … or … “extended hours” … or … “patio”.
Geofinder doesn’t currently support a search parameter, are you looking for comparable functionality provided by the weblog:entries search parameter described at http://expressionengine.com/docs/modules/weblog/parameters.html#par_search?

This would truly be a great feature if this is implemented and would greatly increase the value of the module.

       
illustrationdan's avatar
illustrationdan
26 posts
16 years ago
illustrationdan's avatar illustrationdan

I have everything working. I just cant get it to filter by categories.

Seems the problem is in my categories=”{segment_5}” its in the right place, it even places the right category number, even adds 1-2-3 if multiple categories are selected on the form.

http://myclientsite.com/search/results/Nashville,+TN/300/4

i can change the last segment_5 to any number and it doesnt effect the results in any way.

The radius and address, zip, latitude, longitude is all working. Just that last segment isnt passing and filtering my categories.

I even copied the the form and results page verbatim from the geofinder docs to make sure, of course changing the weblog and variables unique to my site. But still nothing.

Within the {exp:geofinder:location_results….. tag it doesnt want to display anything related to categories, just blank.

Many thanks to anyone who can help me figure this out.

       
Jason Ferrell's avatar
Jason Ferrell
33 posts
16 years ago
Jason Ferrell's avatar Jason Ferrell

illustrationdan I have sent you an email requesting template files, please supply those so I can check for typos, etc.

       
illustrationdan's avatar
illustrationdan
26 posts
16 years ago
illustrationdan's avatar illustrationdan

Thanks for the quick response Jason!

everyone make sure you use

category="{segment_5}"

instead of

categories="{segment_5}"

By far the most painful typo to date lol

       
Manoj Thomas's avatar
Manoj Thomas
185 posts
16 years ago
Manoj Thomas's avatar Manoj Thomas

Great module, Jason - thanks!

Do you have an example of a search results listing using pagination? I’m trying it out, but the results stay stuck on the first page and the URL continues to build (/stores/locations/78745/100/P10/P10/P10…) rather than paging forward. I tried setting the ‘dynamic’ parameter to ‘on’ based on this comment, but no luck: http://expressionengine.com/docs/modules/weblog/pagination_page.html#614

Thanks, Manoj

       
Manoj Thomas's avatar
Manoj Thomas
185 posts
16 years ago
Manoj Thomas's avatar Manoj Thomas

Whoops, nevermind. I needed to add the ‘paginate’ parameter in there for it to work. 😉

       
Manoj Thomas's avatar
Manoj Thomas
185 posts
16 years ago
Manoj Thomas's avatar Manoj Thomas

Hi Jason, can the location results be limited by a custom status? It seems to work with the ‘open’ and ‘closed’ statuses, but not when I try to limit by a custom status. Could you point me to the line in mod.geofinder.php?

Thanks, Manoj

       
Aquarian Web Studio's avatar
Aquarian Web Studio
193 posts
15 years ago
Aquarian Web Studio's avatar Aquarian Web Studio

Hi Jason,

Can proximity results actually be displayed as points on a map? Are you able to provide documentation for this? (Am I missing something?)

thanks, Caroline

       
DougH's avatar
DougH
205 posts
15 years ago
DougH's avatar DougH

This looks awesome and will fit right in to a website I’m developing. But I have a question…

What’s the best way to find the latitude and longitude of any address you’re adding?

       
Original Roots's avatar
Original Roots
2 posts
15 years ago
Original Roots's avatar Original Roots
Hi Jason, Can proximity results actually be displayed as points on a map? Are you able to provide documentation for this? (Am I missing something?) thanks, Caroline

Yes, use the Google Maps API combined with the location_results tag to generate markers for your map. Email [email protected] if you need further help.

       
Original Roots's avatar
Original Roots
2 posts
15 years ago
Original Roots's avatar Original Roots
This looks awesome and will fit right in to a website I’m developing. But I have a question… What’s the best way to find the latitude and longitude of any address you’re adding?

Geotagger is “our favorite” way to get latitude and longitude for entries.

http://natural-logic.com/software/geotagger-for-expression-engine/

       
clefevre's avatar
clefevre
5 posts
15 years ago
clefevre's avatar clefevre
Hi Jason, Can proximity results actually be displayed as points on a map? Are you able to provide documentation for this? (Am I missing something?) thanks, Caroline

Here is what I used -

XML

<?xml version="1.0"?>
<markers>
{exp:geofinder:location_results weblog="yourweblog" status="open"  geoquery="{segment_3}" radius="{segment_4}" category="{segment_5}" latitude="{latitude}" longitude="{longitude}" google_maps_api_key="" distance_mode="miles"}

<marker name='{title}' lat='{latitude}' lng='{longitude}'>

{/exp:geofinder:location_results}

</markers>

and the JS used in the Results page

function load() {
          if (GBrowserIsCompatible()) {
            var map = new GMap2(document.getElementById("map"));
            map.removeMapType(G_HYBRID_MAP);
            map.removeMapType(G_SATELLITE_MAP);
            var mapControl = new GMapTypeControl();
            map.addControl(mapControl);
            map.addControl(new GSmallZoomControl3D());
             map.setCenter(new GLatLng({exp:geofinder:geocode geoquery="{segment_3}" google_maps_api_key=""}{latitude},{longitude}{/exp:geofinder:geocode}), 9);
             
            GDownloadUrl("http://www.yourwebsite.com/templates/search-xml/{segment_3}/{segment_4}/{segment_5}", function(data) {
              var xml = GXml.parse(data);
              var markers = xml.documentElement.getElementsByTagName("marker");
              for (var i = 0; i < markers.length; i++) {
                var name = markers[i].getAttribute("name");
                var point = new GLatLng(parseFloat(markers[i].getAttribute("lat")),
                                        parseFloat(markers[i].getAttribute("lng")));
                var marker = createMarker(point, name);
                map.addOverlay(marker);
                      }
                });
              }
        }
        function createMarker(point, name) {
              var marker = new GMarker(point);
              var html = "<b>" + name + "</b>";
                  GEvent.addListener(marker, 'click', function() {
                marker.openInfoWindowHtml(html);
              });
          return marker;
        }

window.onload = load;
window.onunload = GUnload;
       
bryan2jumpstart's avatar
bryan2jumpstart
98 posts
15 years ago
bryan2jumpstart's avatar bryan2jumpstart

Jason,

Just sent you a PM with a modified geofinder module that supports related weblog entries during search. You can see it here, http://mk.click2jumpstart.com/portfolio/, if you select any shingle 1 result comes up. If you select Burnt Siena nothing comes up and if you select weathered wood you get the one result. You can also select multiple ones just like categories.

       
1 2

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.