Class: ProductViewer

JNC.Views. ProductViewer

new ProductViewer(options)

This component provide a very basic viewer for Navionics Products.

Name Type Description
options array | object

Use the same properties of component JNC.Views.BoatingNavionicsMap

Example
        var productViewer = new JNC.Views.ProductViewer({
            tagId: '.test_map_div',
            center: [ -102.797723, 41.051967 ],
            zoom: 0.8
        });
        productViewer.productListCreated('HotMapsPlatinum');
        productViewer.productItemCreated('HMPT-C6', 'HotMapsPlatinum', '/examples/data/kml/HMPT-C6.kml', '#990234');
        productViewer.productItemCreated('HMPT-E6', 'HotMapsPlatinum', '/examples/data/kml/HMPT-E6.kml', '#0165ff');
        productViewer.productItemCreated('HMPT-N6', 'HotMapsPlatinum', '/examples/data/kml/HMPT-N6.kml', '#979900');
        productViewer.productItemCreated('HMPT-S6', 'HotMapsPlatinum', '/examples/data/kml/HMPT-S6.kml', '#0204F6');
        productViewer.productItemCreated('HMPT-W6', 'HotMapsPlatinum', '/examples/data/kml/HMPT-W6.kml', '#0B9C06');
        productViewer.showProductList('HotMapsPlatinum');

Extends

Methods

hideProductList(productListId)

Hide product on map

Name Type Description
productListId string

The product ID

highlightProductItem(productItemCode, productListId)

Highlight ProductItem

Name Type Description
productItemCode string

The chart ID

productListId string

The product ID

lowlightProductItem(productItemCode, productListId)

Lowlight ProductItem

Name Type Description
productItemCode string

The chart ID

productListId string

The product ID

productItemCreated(productItemCode, productListId, kmlurl, color)

Add a new Chart on Product List

Name Type Description
productItemCode string

Product Code Id

productListId string

Product List Id

kmlurl uri

the url of KML

color string

the Color of Component

productListCreated(productListId)

Create a new Product List

Name Type Description
productListId string

Product List Identification

removeProductList(productListId)

Remove product on map

Name Type Description
productListId string

The product List ID

selectProductItem(productItemCode, productListId, tryAutoZoom)

Select one Chart on view

Name Type Default Description
productItemCode string

The chart ID

productListId string

The product ID

tryAutoZoom boolean true optional

Attempt AutoZoom

showProductList(productListId)

Show all the Product List on the Map

Name Type Description
productListId string

The product List Identification

showProducts(productItemCode, productListId, tryAutoZoom)

Show product on Map

Name Type Default Description
productItemCode string

The chart ID

productListId string

The product ID

tryAutoZoom boolean true optional

Try to set in view the chart

unSelectProduct(productItemCode, productListId)

Unselect one Chart on view

Name Type Description
productItemCode string

The chart ID

productListId string

The product ID

Events

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

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