Class: ProductBoundaryViewer

JNC.ProductCatalog. ProductBoundaryViewer

new ProductBoundaryViewer(options)

(COMPONENT in TEST STAGE) This component allow the Fetch, Query, and Visualization of Navionics Product into Navionics Chart

Name Type Description
options array | object optional

Some initialization options. Checkout also JNC.Views.BoatingNavionicsMap and JNC.Views.Map options

Name Type Default Description
url String 'https://webapp.navionics.com' optional

Data backend url

locale String 'en' optional

Languages of catalog, ['en', 'de', 'fr', 'it', 'es']

ready function optional

Callback function called when the component is ready to work. The parameter widget is the instance of component

error function optional

Callback function called when the component have some network error. The parameter widget is the instance of component

See:
Example
    <div id="smart_product_view_example" style="width:100%; width:100%;"></div>
    <script>
      function doStuff(widget){
    console.log("Component Up and Running, checkout the product catalog: ", widget.getCatalog());

      }

      function doRecoveryError(widget){
    console.log("Recovery the component, it come in error for some reason");
      }

      var mapview = new JNC.ProductCatalog.ProductBoundaryViewer({
    tagId: '#smart_product_view_example',
    center: [-102.797723, 41.051967],
    zoom: 0.8,
    navKey: ****,
    ready: doStuff,
    error: doRecoveryError
      });
    </script>

Extends

Members

static,readonlyJNC.ProductCatalog.ProductBoundaryViewer.SCOPEnumber

SCOPE of visualizzation

Properties:
Name Type Default Description
CHART number 0

Show only the selected Chart

ALL_REGION number 1

Show all the chart in the same Region of selected Chart

ALL_GROUP number 2

Show all the chart in the same Group of selected Chart

ALL_PRODUCT number 3

Show all the chart in the same Product of selected Chart

Methods

clean()

Remove all the chart from the Map

Throws:

Error If the component is not ready

Type
Error

getCatalog(){array}

Return all the possible Charts present on the Navionics Product Catalog

Throws:

If the component is not ready

Type
Error
Returns:
array of chart Object

getChartInfo(chartId){object}

Get all information about chart by Chart Id

Name Type Description
chartId string

The Chart Identification of product to show

Throws:
  • Component is not ready

    Type
    Error
  • Chart Does not exist

    Type
    Error
  • Not Found

    Type
    Error
Returns:
JSON object that represent the chart

highlight(chartId)

Highlight chart on Map

Name Type Description
chartId string

The Chart Identification of product to show

Throws:
  • Component is not ready

    Type
    Error
  • Chart Does not Exist

    Type
    Error

lowlight()

Lowlight chart on Map

Throws:
  • Component is not ready

    Type
    Error
  • Chart Does not Exist

    Type
    Error

select(chartId)

Select chart on Map

Name Type Description
chartId string optional

Chart to select

Throws:
  • Component is not ready

    Type
    Error
  • Chart Doesn\'t Exist

    Type
    Error

show(chartId, tryAutoZoom, scope)

Show the selected chart on map

Name Type Default Description
chartId string

The chart to show

tryAutoZoom boolean true optional

Try to set in view the chart

scope JNC.ProductCatalog.ProductBoundaryViewer.SCOPE CHART optional

The scope visualization

Throws:
  • Component is not ready

    Type
    Error
  • Chart Doesn\'t Exist

    Type
    Error

unselect()

Select chart on Map

Throws:
  • Component is not ready

    Type
    Error
  • Chart Does not Exist

    Type
    Error

Events

inherited event:highlightProduct

Fired Every time the mouse is over one product

Name Type Description
id string

product identification

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

inherited 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.

inherited 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.

inherited 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:selectProduct

Fired Every time the mouse click one product

Name Type Description
id string

product identification

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

inherited map:resize

inherited map:zoomchange

Event is triggered by map zoom

ProductBoundaryViewer:Product:mouseOut

Fired when the mouse is out one product

Name Type Description
id string

product identification

ProductBoundaryViewer:Product:mouseOver

Fired when the mouse is over one product

Name Type Description
id string

product identification

ProductBoundaryViewer:Product:selected

Fired when a product is selected

Name Type Description
chart object

the chart

ProductBoundaryViewer:Product:unselected

Fired when a product is selected

Name Type Description
chart object

the chart

ProductBoundaryViewer:Ready

Fired when the component is ready to work