Skip to main content

map-element

Functions

_assert(v, message)

Custom assert for local validation

mapElement(options)Object

A helper to build your own component for the plugin

_assert(v, message)

Custom assert for local validation

Kind: global function

ParamTypeDescription
vbooleanThe expression that should return a boolean value, if false the assertion fails
messagestringError message to be displayed

mapElement(options) ⇒ Object

A helper to build your own component for the plugin

Kind: global function
Returns: Object - A component object that should be exported by default from a Vue component

ParamTypeDescription
optionsObject
options.mappedPropsObjectDefinitions of props
options.mappedProps.PROP.typeObjectValue type
options.mappedProps.PROP.twoWayBoolean- Whether the prop has a corresponding PROP_changed event
options.mappedProps.PROP.noBindBoolean- If true, do not apply the default bindProps / bindEvents. However it will still be added to the list of component props
options.propsObjectRegular Vue-style props. Note: must be in the Object form because it will be merged with the mappedProps
options.eventsObjectGoogle Maps API events that are not bound to a corresponding prop
options.nameStringe.g. polyline
options.ctrfunctionconstructor, e.g. google.maps.Polyline. However, since this is not generally available during library load, this becomes a function instead, e.g. () => google.maps.Polyline which will be called only after the API has been loaded default: () => String
options.ctrArgsfunctionIf the constructor in ctr needs to be called with arguments other than a single options object, e.g. for GroundOverlay, we call new GroundOverlay(url, bounds, options) then pass in a function that returns the argument list as an array default: (MappedProps, OtherVueProps) => Array Otherwise, the constructor will be called with an options object, with property and values merged from: 1. the options property, if any 2. a map property with the Google Maps 3. all the properties passed to the component in mappedProps
options.beforeCreatefunctionHook to modify the options passed to the initializer default: (Object) => Any
options.afterCreatefunctionHook called when default: (options.ctr, Object) => Any