Web Component: j-MapMarker
j-MapMarker (BETA)
- jComponent
v19
path="target.property"
can contain GPS48.727903,19.157763
or textViestova 28, Banská Bystrica, Slovakia
- two way binding works with GPS (so the component returns GPS coordinates into the model when the
text
is used instead of GPS)
Google API:
- allow
geometry
services
Configuration:
key
{String}
IMPORTANT Google API keytype
{String}
needs to contain a map type (roadmap
(default),satellite
,hybrid
,terrain
)draggable
{Boolean}
for drag & drop marker (default:false
)zoom
{Number}
, default13
autocomplete
{Boolean}
enables auto-complete API (default:false
and input must be attached bymapmarker/autocomplete
method)icon
needs to contain a URL to a new icon markeranimation
needs to contain a animation type (bounce
anddrop
)darkmode
{Boolean}
enables dark mode (default:false
)parent
{String}
jQuery selector which will be used asheight
container (default:auto
)height
{Number}
height of the map (default:undefined
)heightlg
{Number}
height of the map (default:undefined
)heightmd
{Number}
height of the map (default:undefined
)heightsm
{Number}
height of the map (default:undefined
)heightxs
{Number}
height of the map (default:undefined
)margin
{Number}
top/bottom margin of the map (default:0
)marginlg
{Number}
top/bottom margin of the map (default:undefined
)marginmd
{Number}
top/bottom margin of the map (default:undefined
)marginsm
{Number}
top/bottom margin of the map (default:undefined
)marginxs
{Number}
top/bottom margin of the map (default:undefined
)markerwidth
{Number}
marker width, default40
markerheight
{Number}
marker height, default:50
markeroffsetx
{Number}
marker X offset, default1
markeroffsety
{Number}
marker Y offset, default:0
infox
{Number}
label offset Y, default:0
infoy
{Number}
label offset X, default:0
labelopacity
{Number}
marker label opacity, default:0.75
markercluster
{Boolean}
enables marker clusterer (default:true
)onposition
{String}
a path tofunction(component, visible_markers)
- evaluated when the position on the map is changedonready
{String}
a path tofunction(component)
- evaluated when the map is ready to use
Methods:
component.autocomplete(input)
input for autocompletecomponent.clear()
Removes all markerscomponent.add(opt)
Adds markeropt.icon
URL address to iconopt.gps
{String}
GPS positionopt.center
{Boolean}
centers the map to this positionopt.tooltip
{String}
tooltip for the markeropt.callback
{Function(opt)} triggered when the marker is addedopt.onclick
{Function(opt)} triggered when the user clicks on the markeropt.onposition
{Function(opt)} triggered when the user changes the position of the map- IMPORTANT:
opt
will be extendend by adding methods:opt.remove()
,opt.setIcon(url)
,opt.setPosition(gps)
,opt.setVisible(boolean)
and properties:opt.element
,opt.marker
,opt.map
andopt.zoom
Author
- Peter Širka petersirka@gmail.com
- License
Created
01. december 2020
Updated
31. january 2023
jComponent library
19
Version
v1
License
https://www.totaljs.com/license/
Responsive
Yes
Author
Peter Širka
Email
petersirka@gmail.com