I have developed a standalone swing application loaded with a shapefile of a road network using geotools (v.14.3). Now I would like to implement a feature where the user may zoom the map, and at a pre-set zoom level, the traffic volumes of the currently visible road would be drawn close to the road (Here's a sample, instead of letters, there would be the traffic volume in a number). Traffic volume is a number which the user would need to take decisions.
I've seen an example here where they discuss about drawing circles and other polygons on a separate layer on a JmapPane.
How can I draw the traffic volume of the currently zoomed road?