Vue-instantsearch: Geo-Search

Created on 26 Aug 2017  路  5Comments  路  Source: algolia/vue-instantsearch

Can I use Geo-Search with this component for Vue?

All 5 comments

Yes you can. Can you describe what you want to achieve so we can provide better help?

I have all records in algolia of videos filmed on different locations i save the coordinates of the location on the _geoloc tag, but using this component for vue i want to display the map all videos. How can i do that?

Most of the job is not really related to Algolia, you'll have to display the map and pointers. then you can use <ais-results> to loop through the result. I have use this library in the past: https://github.com/xkjyeah/vue-google-maps

If you choose to go with this one, for example, the code would look like this:

<gmap-map
        :center="{lat:10, lng:10}"
        :zoom="12">

    <ais-results>
        <template scope="{ result }">

            <gmap-marker :position="result._geoloc"></gmap-marker>

        </template>
    </ais-results>

</gmap-map>

Note: You need to ensure that the _geoloc values are floats, not strings.

@julienbourdeau thank you for your response, i will try to use the package.

@julienbourdeau It work's perfect, i love it. thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

matthewmnewman picture matthewmnewman  路  6Comments

shaunnez picture shaunnez  路  3Comments

fi0 picture fi0  路  3Comments

dulnan picture dulnan  路  5Comments

abattenburg picture abattenburg  路  4Comments