Live Chat

We'll need to share your messages (and your email address if you're logged in) with our live chat provider, Drift. Here's their privacy policy.

If you don't want to do this, you can email us instead at contact@anvil.works.

anvil.GoogleMap.Data Module

Classes

Feature

Create a new Feature.

Constructor

Feature([geometry=None], [id=None], [properties=None])

Instance Methods

to_geo_json() → string

Exports this feature as a GeoJSON object.


Feature Attributes

geometry - geometry

The feature geometry.

id - string

Feature ID is optional.

to_geo_json - to_geo_json

Exports this feature as a GeoJSON object.


Geometry

Create a new ‘Geometry’ object

Constructor

Geometry()

Instance Methods

get_type() → string

Returns the type of the geometry object.


Geometry Attributes

get_type - get_type

Returns the type of the geometry object.


GeometryCollection

Constructs a Data.GeometryCollection from the given geometry objects or LatLngs.


Base class: anvil.GoogleMap.Data.Geometry

Constructor

GeometryCollection(points)

Instance Methods

get_array() → list(anvil.GoogleMap.Data.Geometry instance)

Returns an array of the contained Geometries. A new array is returned each time get_array() is called.

get_at(n) → anvil.GoogleMap.Data.Geometry instance

Returns the n-th contained Geometry.

get_length() → number

Returns the number of contained Geometries.


GeometryCollection Attributes

get_array - get_array

Returns an array of the contained Geometries. A new array is returned each time get_array() is called.

get_at - get_at

Returns the n-th contained Geometry.

get_length - get_length

Returns the number of contained Geometries.


LinearRing

Constructs a Data.LinearRing from the given LatLngs


Base class: anvil.GoogleMap.Data.Geometry

Constructor

LinearRing(points)

Instance Methods

get_array() → list(anvil.GoogleMap.LatLng instance)

Returns an array of the contained LatLngs. A new array is returned each time get_array() is called.

get_at(n) → anvil.GoogleMap.LatLng instance

Returns the n-th contained LatLng.

get_length() → number

Returns the number of contained LatLngs.


LinearRing Attributes

get_array - get_array

Returns an array of the contained LatLngs. A new array is returned each time get_array() is called.

get_at - get_at

Returns the n-th contained LatLng.

get_length - get_length

Returns the number of contained LatLngs.


LineString

Create a new LineString geometry from the specified points.


Base class: anvil.GoogleMap.Data.Geometry

Constructor

LineString(points)

Instance Methods

get_array() → list(anvil.GoogleMap.LatLng instance)

Returns an array of the contained LatLngs. A new array is returned each time get_array() is called.

get_at(n) → anvil.GoogleMap.LatLng instance

Returns the n-th contained LatLng.

get_length() → number

Returns the number of contained LatLngs.


LineString Attributes

get_array - get_array

Returns an array of the contained LatLngs. A new array is returned each time get_array() is called.

get_at - get_at

Returns the n-th contained LatLng.

get_length - get_length

Returns the number of contained LatLngs.


MultiLineString

Constructs a Data.MultiLineString from the given Data.LineStrings or arrays of positions.


Base class: anvil.GoogleMap.Data.Geometry

Constructor

MultiLineString(points)

Instance Methods

get_array() → list(anvil.GoogleMap.Data.LineString instance)

Returns an array of the contained Data.LineStrings. A new array is returned each time get_array() is called.

get_at(n) → anvil.GoogleMap.Data.LineString

Returns the n-th contained Data.LineString.

get_length() → number

Returns the number of contained Data.LineStrings.


MultiLineString Attributes

get_array - get_array

Returns an array of the contained Data.LineStrings. A new array is returned each time get_array() is called.

get_at - get_at

Returns the n-th contained Data.LineString.

get_length - get_length

Returns the number of contained Data.LineStrings.


MultiPoint

Create a new MultiPoint geometry containing the specified points.


Base class: anvil.GoogleMap.Data.Geometry

Constructor

MultiPoint(points)

Instance Methods

get_array() → list(anvil.GoogleMap.LatLng instance)

Returns an array of the contained LatLngs. A new array is returned each time get_array() is called.

get_at(n) → anvil.GoogleMap.LatLng instance

Returns the n-th contained LatLng.

get_length() → number

Returns the number of contained LatLngs.


MultiPoint Attributes

get_array - get_array

Returns an array of the contained LatLngs. A new array is returned each time get_array() is called.

get_at - get_at

Returns the n-th contained LatLng.

get_length - get_length

Returns the number of contained LatLngs.


MultiPolygon

Constructs a Data.MultiPolygon from the given Polygons or arrays of positions.


Base class: anvil.GoogleMap.Data.Geometry

Constructor

MultiPolygon(points)

Instance Methods

get_array() → list(anvil.GoogleMap.Data.Polygon instance)

Returns an array of the contained Polygons. A new array is returned each time get_array() is called.

get_at(n) → anvil.GoogleMap.Data.Polygon instance

Returns the n-th contained Polygon.

get_length() → number

Returns the number of contained Polygons.


MultiPolygon Attributes

get_array - get_array

Returns an array of the contained Polygons. A new array is returned each time get_array() is called.

get_at - get_at

Returns the n-th contained Polygon.

get_length - get_length

Returns the number of contained Polygons.


Point

Create a new Point at the specified position.


Base class: anvil.GoogleMap.Data.Geometry

Constructor

Point(lat_lng)

Instance Methods

get() → anvil.GoogleMap.LatLng instance

Returns the contained LatLng.


Point Attributes

get - get

Returns the contained LatLng.


Polygon

Constructs a Data.Polygon from the given LinearRings or arrays of positions.


Base class: anvil.GoogleMap.Data.Geometry

Constructor

Polygon(points)

Instance Methods

get_array() → list(anvil.GoogleMap.Data.LinearRing instance)

Returns an array of the contained LinearRings. A new array is returned each time get_array() is called.

get_at(n) → anvil.GoogleMap.Data.LinearRing instance

Returns the n-th contained LinearRing.

get_length() → number

Returns the number of contained LinearRings.


Polygon Attributes

get_array - get_array

Returns an array of the contained LinearRings. A new array is returned each time get_array() is called.

get_at - get_at

Returns the n-th contained LinearRing.

get_length - get_length

Returns the number of contained LinearRings.


StyleOptions

Create a new ‘StyleOptions’ object

Constructor

StyleOptions([StyleOptions=], [clickable=], [cursor=], [draggable=], [editable=], [fill_color=], [fill_opacity=], [icon=], [stroke_color=], [stroke_opacity=], [stroke_weight=], [title=], [visible=], [z_index=])

StyleOptions Attributes

clickable - boolean

If true, the marker receives mouse and touch events. Default value is true.

cursor - string

Mouse cursor to show on hover. Only applies to point geometries.

draggable - boolean

If true, the object can be dragged across the map and the underlying feature will have its geometry updated.

editable - boolean

If true, the object can be edited by dragging control points and the underlying feature will have its geometry updated.

fill_color - string

The fill color.

fill_opacity - number

The fill opacity between 0.0 and 1.0.

icon - icon

Icon for the foreground.

stroke_color - string

The stroke color.

stroke_opacity - number

The stroke opacity between 0.0 and 1.0.

stroke_weight - number

The stroke width in pixels.

title - string

Rollover text.

visible - boolean

Whether the feature is visible.

z_index - number

All features are displayed on the map in order of their zIndex, with higher values displaying in front of features with lower values.



anvil.GoogleMap.Data