# Use Store Locator JS API without Google/Baidu Maps

**URL:** <https://forum.woosmap.com/t/use-store-locator-js-api-without-google-baidu-maps/133>\
**Category:** Ask the community\
**Tags:** store-locator, map-api\
**Created:** [December 22, 2022, 10:26am UTC](https://forum.woosmap.com/t/use-store-locator-js-api-without-google-baidu-maps/133 "2022-12-22T10:26:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dominic](https://avatars.discourse-cdn.com/v4/letter/d/13edae/32.png) [@dominic](https://forum.woosmap.com/u/dominic)\
**Post date:** [December 22, 2022, 10:26am UTC](https://forum.woosmap.com/t/use-store-locator-js-api-without-google-baidu-maps/133/1 "2022-12-22T10:26:18Z")

</div>

Hey there. I have implemented a map using the Map JS API. It is not connected to Google Maps services and can render markers etc. Now i want to implement a store search, preferrably using the Store Locator JS API. In the documentation and all the examples i could find online it’s always required to use the google maps integration, but i lowkey hope this could work also with the default woosmap-map. So my question would be: Is it easily possible to search for stores with queries either using the Store Locator JS API (but without google maps), or maybe even with the Map JS API?  
thx for your help 🙂

---

<div class="post-metadata">

**Author:** ![gael](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.woosmap.com/gael/32/3_2.png) [@gael](https://forum.woosmap.com/u/gael)\
**Post date:** [December 22, 2022, 10:49am UTC](https://forum.woosmap.com/t/use-store-locator-js-api-without-google-baidu-maps/133/2 "2022-12-22T10:49:23Z")

</div>

Hey @dominic, thanks for joining the Woosmap Community.

It’s a good question.  
Yes you can do it through the Map JS API.  
If you’re using the [`woosmap.map.StoresOverlay`](https://developers.woosmap.com/products/map-api/guides/display-stores-overlay/) to display your stores, you can implement the `setQuery(query)` method.

```javascript
let storesOverlay;
storesOverlay = new woosmap.map.StoresOverlay(style);
storesOverlay.setQuery('type:"click_and_collect"');

```

Your search query should match the [Search API](https://developers.woosmap.com/products/search-api/search-query/) guidelines.

If you want to search nearby a position, the `StoresOverlay` will not be sufficient. You will need to query the stores through a Search API call and process your response to add markers as you want.

Here is a more advanced example for doing this (check especially the sources of [map component](https://github.com/Woosmap/ts-mapjs-storelocator-sample/blob/master/src/components/map/map.ts) and [stores api client](https://github.com/Woosmap/ts-mapjs-storelocator-sample/blob/master/src/services/api/stores.ts)):

> **[GitHub - Woosmap/ts-mapjs-storelocator-sample: Store Locator sample based on Woosmap Map JS using...](https://github.com/Woosmap/ts-mapjs-storelocator-sample)**
>
> Store Locator sample based on Woosmap Map JS using typescript and vanillajs

https://demo.woosmap.com/storelocator/mapjs

---

<div class="post-metadata">

**Author:** ![dominic](https://avatars.discourse-cdn.com/v4/letter/d/13edae/32.png) [@dominic](https://forum.woosmap.com/u/dominic)\
**Post date:** [December 22, 2022, 11:07am UTC](https://forum.woosmap.com/t/use-store-locator-js-api-without-google-baidu-maps/133/3 "2022-12-22T11:07:34Z")

</div>

Hey Gael, thank you for the quick and detailed response! I will fiddle around with the setQuery function, this should be sufficient for a simple usecase of finding stores in a city 🙂
