var MapCreator = require('fx-dashboard/start');
var mapCreator = new MapCreator({
el: '#map-creator',
model: {},
geoSubject: 'gaul0',
colorRamp: 'GnBu', //Blues, Greens. colorRamp values http://fenixrepo.fao.org/cdn/fenix/fenix-ui-map-datasets/colorramp.png
legendtitle: 'Example Override Legend Title',
fenix_ui_map: {
guiController: {
overlay: false,
baselayer: false,
wmsLoader: false
},
baselayers: {
"cartodb": {
title_en: "CartoDB light",
url: 'http://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png'
}
},
labels: true,
boundaries: true
}
});
Parameter | Type | Default Value | Example | Description |
---|---|---|---|---|
el | CSS3 Selector/JavaScript DOM element/jQuery DOM element | - | "#container" | component container |
model | Object | - | - | Fenix Resource Object |
fenix_ui_map | Object | ```javascript guiController: { overlay: false, baselayer: false, wmsLoader: false }, ... ``` | - | Pass options to Fenix ui Map Options |
WMS_URL | string | "http://fenix.fao.org/demo/fenix/geoserver" | "http://fenix.fao.org/geoserver" (production URI) | URI for Geoserver Services, WMS/WFS Layers and others |
leaflet | Object |
|
Name | Parameters | Description |
---|---|---|
invalidateSize | - | Update Map dimensions after container is resized |
addLayer | Object: Fenix Model | Leaflet Layer | Append more Fenix Layers in the same map |
addBaseLayer | Object: Leaflet Layer | Append more Base Layers in the same map |
dispose | - | destroy the map |
Name | Parameters | Description |
---|---|---|
ready | - | Run after Map rendered data |