code: public static String generateLink(Geometry geom, boolean withMarker) {
          if (geom == null) {
              return null;
          }
          Envelope env = geom.getEnvelopeInternal();
          StringBuilder sb = new StringBuilder("http://www.openstreetmap.org/?");
          sb.append("minlon=").append(env.getMinX());
          sb.append("&minlat=").append(env.getMinY());
          sb.append("&maxlon=").append(env.getMaxX());
          sb.append("&maxlat=").append(env.getMaxY());
          if (withMarker) {
              Coordinate centre = env.centre();
              sb.append("&mlat=").append(centre.y);
              sb.append("&mlon=").append(centre.x);
          }
          return sb.toString();
      }
docs: Create the OSM map link based on the bounding box of the geometry.
  
  @param geom the input geometry.
  @param withMarker true to place a marker on the center of the BBox.
  @return