The trouble of googling for maps in Java
Tags: java, maps, beginners, sdk
Published: 2023-02-23 15:52:47

**What is a map, and why as a Java developer would you have trouble googling for it? Well it depends ... on who you are and what you want it for.**

If you're a Java developer, a `Map` is an object that maps keys to values and stores them in memory. Once stored, a value can be looked up using the key, such as finding the population count (value) for a country (the key).

`Map<String, Integer> populations; 
`
If on the other hand you're a geospatial professional, or somebody who wants to work with geographical data, a map is a visual means to display a scaled down geographical representation of a region, such as this map of Edinburgh, Scotland.

![Java application displaying ArcGIS Colored Pencil basemap](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3z56hplnmhb7qk65sjwl.png)

But what if you're both? A developer who wants to build Java applications that displays a map - how do you google for putting a map in a Java application?

_**Google**: "java map"_
_**Top 3 results**:_ 
_1. [Javatpoint - java-map](https://www.javatpoint.com/java-map)_
_2. [Oracle - java/util/map](https://docs.oracle.com/javase/8/docs/api/java/util/Map.html)_
_3. [w3schools - java hashmap](https://www.w3schools.com/java/java_hashmap)_

The top 3 results of this simple search all return Java `Map` related info. And it's the same for googling "java map library". Things get worse when you google precisely my question above:

_**Google**: "putting a map in a Java application"
**Top 3 results**:_
_1. [Geeksforgeeks - hashmap-put method](https://www.geeksforgeeks.org/hashmap-put-method-...)_
_2. [Software testing help - java-map interface](https://www.softwaretestinghelp.com/java-map-interface/)_
_3. [Javatpoint - java-map](https://www.javatpoint.com/java-map)_

Things get a little more interesting when adding "SDK" into the search however.

_**Google**: "java map sdk"
**Top 3 results**:_
_1. [Oracle - java/util/map](https://docs.oracle.com/javase/8/docs/api/java/util/Map.html)_
_2. [Esri Developers - ArcGIS Maps SDK for Java](https://developers.arcgis.com/java/)_
_3. [Google Maps Platform - Maps SDK for Android](https://developers.google.com/maps/documentation/android-sdk/start)_

The top result is a Java `Map`, but the 2nd and 3rd hits are geographical map developer tools, the first from [Esri](https://developers.arcgis.com/) and the second from [Google](https://developers.google.com/maps) itself. Result! Mapping SDKs for Java developers do exist after all 🎉. 

---

Those in the know _know_ these SDKs exist, but if you're new to programming, it can be really hard finding the right tools amongst the technical jargon. Especially in the case of looking for a map, with `Map` being such a fundamental object type in Java.

Let's try one last _slightly_ more detailed search in our quest to find more elusive geographical maps SDKs for Java out there:

_**Google**: "java geographical maps sdk"
**Top 3 results**:_
_1. [Esri Developers - Java Maps SDK for maps in 2D](https://developers.arcgis.com/java/maps-2d/)_
_2. [Google Maps Platform - Java client for google Maps Services](https://github.com/googlemaps/google-maps-services-java)_
_3. [Google Maps Platform - Client Libraries](https://developers.google.com/maps/documentation/geocoding/client-library)_

Even better results this time! A whole PAGE and more of map-related SDK goodness: no mention of a Java `Map` anywhere. 

---

Now you know where to find them, there's really no excuse not to use maps, that aren't `Map`s, in your Java apps (_yes, that made my brain hurt too_).

**So a couple of no-brainer takeaways:**
- the more precise you can be whilst googling for niche tools, the better the results will be, remember e.g. java map vs java geographical maps sdk.
- if you want developers to find your awesome maps SDK whilst googling, invest in good SEO and documentation and narrow down on those specific keywords to help your product rank higher in search engines.
- be even more precise: dig deeper and be more specific with what framework you want to use, e.g. searching for "javafx geographic map sdk".

And let's not even get started on how as a developer of mapping software you name your [non Java-map map class](https://developers.arcgis.com/java/api-reference/reference/com.esri.arcgisruntime/com/esri/arcgisruntime/mapping/ArcGISMap.html). 

I'll leave you with that mappy thought! 🗺