Package provided.owlMaps.demo.model
Class DemoModel
java.lang.Object
provided.owlMaps.demo.model.DemoModel
public class DemoModel
extends java.lang.Object
The model for the OwlMaps demo app
- Author:
- swong
-
Field Summary
Fields Modifier and Type Field Description private IModel2ViewAdapter
model2ViewAdpt
The adapter to the viewprivate IOwlMap
owlMap
A local reference to the map itself.private IOwlMapControl
owlMapControl
The OwlMapControl object that runs everything about the map.private IOwlMapUtils
owlMapUtils
The map-dependent map utilities -
Constructor Summary
Constructors Constructor Description DemoModel(IModel2ViewAdapter model2ViewAdpt, java.lang.String googleMapsApiKey)
Construct the demo model -
Method Summary
Modifier and Type Method Description void
addGeoJson()
Add GeoJSON data using the currently set data styling.void
goToLatLng(ILatLng latLng)
Pan the map to the given ILatLng locationvoid
goToPlace(IPlace place)
Move the map to the given IPlace location and zoom levelvoid
loadGeoJson()
Load outlines of world countries with a specific default styling and an overridden styling for USA.void
makeCircle(ILatLng originLatLng)
Make an ICircle object at the given locationvoid
makeInfoWin(ILatLng latLng)
Make an IInfoWindow object at the given locationvoid
makeMarker(ILatLng latLng)
Make an IMarker object at the given locationvoid
makeOverlay(ILatLng originLatLng)
Make an overlay centered at the given lat/lngvoid
makePolygon(ILatLng originLatLng)
Make an IPolygon object at the given locationvoid
makePolyline(ILatLng originLatLng)
Make an IPolyline object at the given locationvoid
makeRectangle(ILatLng originLatLng)
Make an IRectangle object at the given locationvoid
resetMap()
Reset the map.void
start()
Start the model.void
stop()
Stop the model.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
model2ViewAdpt
The adapter to the view -
owlMapControl
The OwlMapControl object that runs everything about the map. -
owlMap
A local reference to the map itself. This could have always been retrieved directly from the OwlMapControl object. -
owlMapUtils
The map-dependent map utilities
-
-
Constructor Details
-
DemoModel
Construct the demo model- Parameters:
model2ViewAdpt
- The adapter to the viewgoogleMapsApiKey
- The Google Maps API key to use
-
-
Method Details
-
start
public void start()Start the model. -
resetMap
public void resetMap()Reset the map. Currently, only sets the options back to their default settings. -
stop
public void stop()Stop the model. Must call this when exiting in order to stop the JxBrowser engine. -
goToLatLng
Pan the map to the given ILatLng location- Parameters:
latLng
- The location to pan to
-
goToPlace
Move the map to the given IPlace location and zoom level- Parameters:
place
- The IPlace to move to
-
makeMarker
Make an IMarker object at the given location- Parameters:
latLng
- The desired location of the marker
-
makeInfoWin
Make an IInfoWindow object at the given location- Parameters:
latLng
- The desired location of the info window
-
makePolygon
Make an IPolygon object at the given location- Parameters:
originLatLng
- The desired location of the origin point of the polygon
-
makePolyline
Make an IPolyline object at the given location- Parameters:
originLatLng
- The desired location of the origin point of the polyline
-
makeRectangle
Make an IRectangle object at the given location- Parameters:
originLatLng
- The desired location of the origin point of the rectangle
-
makeCircle
Make an ICircle object at the given location- Parameters:
originLatLng
- The desired location of the center the circle
-
makeOverlay
Make an overlay centered at the given lat/lng- Parameters:
originLatLng
- The center of the image
-
loadGeoJson
public void loadGeoJson()Load outlines of world countries with a specific default styling and an overridden styling for USA. The new default styling may change the appearance of an existing feature that uses the default styling. -
addGeoJson
public void addGeoJson()Add GeoJSON data using the currently set data styling. Note that the styling will change if the default styling is changed.
-