0

I'm updating to EE Maps from the older version of the plugin and I'm trying to figure out the comparable replacement for the {exp:gmap:search} tag. Does the update require me to use the JS API search? or is there another way to do it?

The current code looks like the following:

{exp:gmap:search
                        channel="distributors"
                        geocode_field="location"
                        latitude_field="latitude"
                        longitude_field="longitude"
                        distance_field="distance_max"
                        cache_post="false"
                        return="/page"}
                    <input id="h-dist" type="hidden" name="distance_max" value="500"/>
                    <input id="h-search" type="search" name="location" placeholder="Search"/>
                    <input type="hidden" name="status[]" value="open" />
                        <input type="submit" value="Find X">
                    {/exp:gmap:search}

The new code doesn't allow for just switching out the tags.

1
0

My comment was correct. Using the search example below you should be able to get everything you need for this to migrate successfully. If you need to work with post variables you're going to need to submit the data you need before you submit the search form because it is cached to a search result query. I ended up pushing a local storage variable through AJAX to a session to get what I needed.

https://docs.reinos.nl/maps-locator/examples.html#search-example

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.