Calculating tiles to display in a MapRect when “over-zoomed” beyond the overlay tile set

Imagine that the overlay is cloud cover – or in our case, cellular signal coverage. It might not “look good” while zoomed in deep, but the overlay is still conveying essential information to the user. I’ve worked around the problem by adding an OverZoom mode to enhance Apple’s TileMap sample code. Here is the new … Read more

NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder

You have included a dependency on the SLF4J API, which is what you use in your application for logging, but you must also include an implementation that does the real logging work. For example to log through Log4J you would add this dependency: <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-log4j12</artifactId> <version>1.5.2</version> </dependency> The recommended implementation would be logback-classic, which … Read more

Using Spring, mapping to root in web.xml, static resources aren’t found

The problem is that requests for the static content go to the dispatcherServlet, because it’s mapped as <url-pattern>/</url-pattern>. It’s a very common problem in applications with “RESTful” URLs (that is, without any prefix in the DispatcherServlet mapping). There are several possible ways to solve this problem: Since Spring 3.x the preferred way to access static … Read more

How to integrate Struts 2 with Tiles 3

The solution is to add the required dependencies, load tiles with an appropriate listener and create a custom result type. Fortunately these steps are quite easy, once done you can follow normal tiles 2 examples for a how to define templates. 1) Dependencies (start with basic struts project but in this example I’ll use conventions … Read more