new OSH.UI.LeafletView()
Example
var leafletMapView = new OSH.UI.LeafletView("",
[{
styler : pointMarker,
contextMenuId: circularContextMenuId,
name : "Android Phone GPS",
entityId : androidEntity.id
},
{
styler : new OSH.UI.Styler.Polyline({
locationFunc : {
dataSourceIds : [androidPhoneGpsDataSource.getId()],
handler : function(rec) {
return {
x : rec.lon,
y : rec.lat,
z : rec.alt
};
}
},
color : 'rgba(0,0,255,0.5)',
weight : 10,
opacity : .5,
smoothFactor : 1,
maxPoints : 200
}),
name : "Android Phone GPS Path",
entityId : androidEntity.id
}]
);
Extends
Methods
-
addPolyline(properties){string}
-
Name Type Description propertiesReturns:
Type Description string -
inherited addViewItem(viewItem)
-
Add viewItem to the view
Name Type Description viewItem -
attachTo($super, parentElement)
-
Name Type Description $superparentElement -
beforeAddingItems($super, options)
-
Name Type Description $superoptions -
inherited getDataSourcesId(){Array}
-
Returns:
Type Description Array -
getDefaultBaseLayers(){Object}
-
Returns:
Type Description Object -
inherited getDivId(){string|*}
-
Returns:
Type Description string | * -
inherited getId(){string|*}
-
Returns:
Type Description string | * -
inherited handleEvents()
-
-
inherited hide()
-
-
initEvents()
-
-
initLayers()
-
-
initMap(options)
-
Name Type Description options -
onResize($super)
-
Name Type Description $super -
onResize($super)
-
Name Type Description $super -
inherited reset()
-
-
inherited selectDataView($super, dataSourcesIds, entitiesIds)
-
Should be called after receiving osh:SELECT_VIEW event
Name Type Description $superdataSourcesIdsentitiesIds -
inherited setData(dataSourceId, data)
-
Name Type Description dataSourceIddata -
inherited show(properties)
-
Show the view by removing display:none style if any.
Name Type Description properties -
inherited shows(properties)
-
Name Type Description properties -
updateMarker(styler)
-
Name Type Description styler -
updatePolyline(styler)
-
Name Type Description styler