Package com.geodesk.util
Class MapMaker
java.lang.Object
com.geodesk.util.MapMaker
A class for generating a Leaflet-based interactive map.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds a marker for the given feature.Adds a marker for the given bounding box.voidAdds a marker for the given JTS Geometry.voidattribution(String attribution) Sets the attribution displayed on the map.voidGenerates a self-contained HTML file that displays the interactive map and all its markers.voidSets the URL template for the source of map tiles.voidwrite(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
-