Open eklem opened 1 year ago
Use geographical center of all the countries of the world. Then use matcher on names as search.
Functions needed:
Index data
Search data
Skip the indexing and searching. Just use the user's position and sort the countries of the world according to that position. Then do one that shows all results, and one that shows results within a given distance.
Will fit well with the documentation illustrations.
Ok, it needs search-index as part of the demo. So index stuff if not already, and then create a matcher for that content.
Two different maps, based on the two different methods of map boundaries:
Search part of demo. Just needs to show if any documents are indexed or not and an index
-button.
With indexing + mobile version
Use ArrowJS - https://www.arrow-js.com/docs/ as "framework"
To make this easier, skip the map, just use the search engine and sort + cutoff the list.
Leafletjs marker seems to have what I need. Add one that is current position and add the others with different color and maybe a number. Set them all to marker.dragging.disable();
.
Move example code to geo-search-example
Just from/to lat/lon -> distance calculation.