The example demonstrates server-side geo clustering using relational database (SQL) and geohash index.
The example visualizes on a map apartment rental offers grouping offers located near one another together and representing them using colored circle of variable size. The larger the size, the more offers are available in the area. Color represents a price. Green - low price, yellow - average price, red - high price. When you hover over the circle, detailed information on the number of offers and the price is displayed.
As you zoom in, the clusters are divided into smaller ones. At the maximum zoom level, circles represent individual offers.
Read about the implementation in the article on SlideShare.
To build you will need Git and JDK 11 or later.
git clone git@github.com:evgeniy-khist/geohash-example.git
cd geohash-example
This project uses a Gradle build. The instructions below use Gradle Wrapper from the root of the source tree. The wrapper script serves as a cross-platform, self-contained bootstrap mechanism for the build system.
To compile, test and build JAR use:
./gradlew clean build -i
To run the project locally use:
./gradlew clean bootRun
Open URL http://localhost:8080/geohash-example/ in a browser.
This project follows Google Java Style Guide.
You may also be interested to import intellij-java-google-style.xml IntelliJ IDEA code style XML.
The Geohash Example is released under version 2.0 of the Apache License.