Class MapMaker

java.lang.Object
com.geodesk.util.MapMaker

public class MapMaker extends Object
A class for generating a Leaflet-based interactive map.
  • Constructor Details

    • MapMaker

      public MapMaker()
  • Method Details

    • tiles

      public void tiles(String url)
      Sets the URL template for the source of map tiles.
      Parameters:
      url - the URL template
    • attribution

      public void attribution(String attribution)
      Sets the attribution displayed on the map.
      Parameters:
      attribution - the attribution text
    • add

      public Marker add(Geometry geom)
      Adds a marker for the given JTS Geometry.
      Parameters:
      geom - the Geometry (any type)
      Returns:
      the marker
    • add

      public Marker add(com.geodesk.geom.Bounds box)
      Adds a marker for the given bounding box.
      Parameters:
      box - the bounding box
      Returns:
      the marker
    • add

      public Marker add(Feature feature)
      Adds a marker for the given feature.
      Parameters:
      feature - the feature
      Returns:
      the marker
    • add

      public void add(Iterable<? extends Feature> features)
    • save

      public void save(String path) throws IOException
      Generates a self-contained HTML file that displays the interactive map and all its markers.
      Parameters:
      path - name of the file to generate
      Throws:
      IOException
    • write

      public void write(Appendable out) throws IOException
      Throws:
      IOException