Package com.geodesk.util
Class MapMaker
java.lang.Object
com.geodesk.util.MapMaker
A class for generating a Leaflet-based interactive map.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAdds a marker for the given feature.Adds a marker for the given bounding box.void
Adds a marker for the given JTS Geometry.void
attribution
(String attribution) Sets the attribution displayed on the map.void
Generates a self-contained HTML file that displays the interactive map and all its markers.void
Sets the URL template for the source of map tiles.void
write
(Appendable out)
-
Constructor Details
-
MapMaker
public MapMaker()
-
-
Method Details
-
tiles
Sets the URL template for the source of map tiles.- Parameters:
url
- the URL template
-
attribution
Sets the attribution displayed on the map.- Parameters:
attribution
- the attribution text
-
add
Adds a marker for the given JTS Geometry.- Parameters:
geom
- the Geometry (any type)- Returns:
- the marker
-
add
Adds a marker for the given bounding box.- Parameters:
box
- the bounding box- Returns:
- the marker
-
add
Adds a marker for the given feature.- Parameters:
feature
- the feature- Returns:
- the marker
-
add
-
save
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
- Throws:
IOException
-