Class: BoatingNavionicsMap

JNC.Views. BoatingNavionicsMap

new BoatingNavionicsMap(options)

The Navionics Maps used on boat mode with all control and feature.

The Web API allows users to pan and zoom to view any Navionics charts, including SonarCharts™ HD bathymetry, which can be toggled off and on for quick comparison with traditional nautical charts. Integration with third party maps enables you to add points or draw lines and polygons.

Name Type Description
options Array.<Object>

the Configuration of Map

Name Type Default Description
navKey String

Navionics key

bingKey String optional

bing key to show satellite layer

tagId Element

The html target

zoom float 3.0 optional

The Zoom Level from 0.0 to 100.0 in according of selected Layer

center Array.<number> 10.293772,43.879257 optional

the default map center longitude,latitude

distanceUnit JNC.DISTANCE_UNIT NAUTICAL optional

set Distance Units

depthUnit JNC.DEPTH_UNIT METERS optional

set depthUnit

safetyDepth JNC.SAFETY_DEPTH_LEVEL METERS_10 optional

set safetyDepth

layer JNC.MAP_LAYERS NO_OVERLAY optional

Layer Map

DistanceUnitControl boolean true optional

Show DistanceUnitControl

DepthUnitControl boolean true optional

Show DepthUnitControl

DistanceControl boolean true optional

Show DistanceControl

LayerControl boolean true optional

Show LayerControl

SonarControl boolean true optional

Show SonarControl

ZoomControl boolean true optional

Show ZoomControl

logoPayoff boolean false optional

Show Navionics logo without payoff (default behaviour)

theme int optional

Choose a theme of Map

See:
  • please see initialize function for the full list of parameters
Example
      var webapi = new JNC.Views.BoatingNavionicsMap({
        tagId: '.test_map_div',
        center: [ 12.0, 46.0 ],
        navKey: 1234567890
    });

Extends

Methods

activateSonarCharts()

Execute the action to show or hide the SonarChart

getDepthUnit(){JNC.DEPTH_UNIT}

Get the depth unit of chart

getSafetyDepthLevel(){JNC.SAFETY_DEPTH_LEVEL}

Return the safety depth level

Returns:
safety depth level actual used

getSonarCharts()

Is Sonarcharts visible

hideSonarcharts()

Hide Sonarcharts Layer

onMapReady()

Execute the action after layer changed (loaded)

onOverlayChange()

Execute the action to change the layer

resize()

Resize the Map

Fires:
  • EVENTS.event:MAP_RESIZE

setCountryCode(country_code)

Configure the map respect of country code
TODO: to integrate later with universal styling component.

Name Type Description
country_code string

The country code

setDepthUnit(unit)

Set the depth unit of chart

Name Type Description
unit JNC.DEPTH_UNIT

the depth unit to use

Example

...
map.setDepthUnit(JNC.DEPTH_UNIT.METERS);
...

setSafetyDepthLevel(safetyDepthLevel)

Set safety depth level

Name Type Description
safetyDepthLevel JNC.SAFETY_DEPTH_LEVEL

The safety depth level

Example

...
map.setSafetyDepthLevel(JNC.SAFETY_DEPTH_LEVEL.METERS_20);
...

showLayerControl(isVisible)

Show the layer control over the map

Name Type Description
isVisible boolean

showSonarcharts()

Show Sonarcharts Layer

showSonarControl(value)

Show the sonar control over the map

Name Type Description
value boolean

the value

Events

inherited event:initTrackKML

Event is triggered when selected track has KML URL data

inherited KmlBalloonOpen

The event is fired for trace in GoogleAnalytics when kml balloon open.

Properties:
Name Type Description
value String

zoom direction 'zoom-in'\'zoom-out'

inherited KmlLoaded

The event is fired for trace in GoogleAnalytics when default Kml loaded.

Properties:
Name Type Description
kmlUrl String

KML url

MapLoaded

The event is fired for trace in GoogleAnalytics when boating map loaded.

Properties:
Name Type Description
navKey String

Map's navKey

inherited NavionicsAcknowledgementsClicked

The event is fired for trace in GoogleAnalytics when Navionics acknowledgements clicked.

NavionicsDistanceUnitClicked

The event is fired for trace in GoogleAnalytics when Navionics Depth Unit clicked.

inherited NavionicsLogoClicked

The event is fired for trace in GoogleAnalytics when Navionics logo clicked.

OverlayChange

The event is fired for trace in GoogleAnalytics when map overlay changed (osm, bing, etc).

Properties:
Name Type Description
value String

overlay value (osm, bing, etc).

inherited event:resetTrackLML

Event is triggered when opened track need to be hidden

inherited event:showText

Event is triggered to show notification text

inherited ZoomControl

The event is fired for trace in GoogleAnalytics when zoom controls used.

Properties:
Name Type Description
status String

zoom direction zoom-in\zoom-out

inherited map:centerchange

Event is triggered by changing center of the map

inherited map:click

Event is triggered by map click

inherited map:mousePosition

Event is triggered by position of mouse on the map

inherited map:pointermove

Event is triggered by moving of pointer on the map

map:resize

inherited map:zoomchange

Event is triggered by map zoom