The latest release of our AerisWeather Android SDK is now available! SDK v2.1.0 focuses on improved usability and stability, while also adding a few new goodies to the AerisWeather Android development camp. Read on for a rundown of the changes…
The AerisWeather Mapping Platform (AMP) team has a pretty cool gig. After all, what weather geek wouldn’t love generating exciting visual representations of the conditions all around us every day!? They do a great job, and their enthusiasm for their craft sometimes causes them to pump out new map layers faster than us SDK guys can keep up with.
With that in mind, in SDK v2.1.0 we’ve added a way to access AMP layers that have been added to the AerisWeather Mapping Platform but have yet to be officially added to the SDK. It’s pretty straightforward:
1 2 3 4 5 6 7 8 |
//amp layer(s) AerisAmp aerisAmp = m_mapOptions.getAerisAMP(); /** * CUSTOM / UNDOCUMENTED LAYER * AerisAmpLayer(String layerId, String layerName, int layerOpacity) */ AerisAmpLayer customAmpLayer = new AerisAmpLayer("lightning-strikes", "Lightning Strikes", 80); aerisAmp.setLayer(customAmpLayer); |
taken from Demo Project: MyMapFragment.java, initMap()
Not surprisingly, the key to adding an AMP layer that has not yet officially supported by the SDK, is knowing what the layer id is. Presently, there are a couple of ways we can find out what’s available.
Firstly, we can just simply ask support if AMP supports a certain layer, like “Hey guys, do you have a lightning strikes layer for AMP?”. In fact, we do – and its id is just like you see in the above code example “lightning-strikes”.
Another way to determine a layer’s id is to check AMP’s Map Builder. As we add layers to the map, we see their id in the URL sample provided, like this:
So to get the above jet stream layer, you would simply do:
1 2 3 4 5 6 7 8 |
//amp layer(s) AerisAmp aerisAmp = m_mapOptions.getAerisAMP(); /** * CUSTOM / UNDOCUMENTED LAYER * AerisAmpLayer(String layerId, String layerName, int layerOpacity) */ AerisAmpLayer customAmpLayer = new AerisAmpLayer("fjet-stream", "Jet Stream", 80); aerisAmp.setLayer(customAmpLayer); |
Another improvement included with SDK v2.1.0 is API permission caching. The AerisWeather API verifies that each request has proper access credentials before returning a response. Then within the API, each feature has one or more “permissions” that let the API know what data the requester is allowed to receive. So starting with the AerisWeather Android SDK v2.1.0, the permissions data is cached internally for one hour. Subsequently, we can reduce the number of network requests providing a speed up the loading time of apps using the SDK.
Next, we reached into the developer’s mailbag and included a feature request from one of our valued patrons. Another handy addition to the map animation feature is the ability to control the playback speed of the map animation. As of SDK v2.1.0 we now include a speed control in the default map’s animation options.
Finally, SDK v2.1.0 includes a whole host of bug fixes, tweaks, and improvements under the covers. Just to name a few, we did things like raising the z-index of mapped storm cells (and other point data layers) and updated their default colors; we corrected the daylight duration in the Sun/Moon view of the Demo app; and we fixed a JSON error when handling Midnight Sun and Polar Night.
We hope you enjoy the new version and can’t wait to see what you make next! Not currently an AerisWeather user? Check out our free developer trial and start using the Android SDK today!
Happy Coding!
The Aeris Android Team
No comments yet.
Be the first to respond to this article.