{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./inst/htmlwidgets/bindings/esri-leaflet-bindings.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","r","value","n","__esModule","object","property","prototype","hasOwnProperty","p","s","LeafletWidget","methods","addEsriBasemapLayer","key","labelLayer","layerId","group","options","this","layerManager","addLayer","L","esri","basemapLayer","addEsriFeatureLayer","url","markerType","markerIcons","markerIconProperty","markerOptions","markerIconFunction","clusterOptions","clusterId","labelProperty","labelOptions","popupProperty","popupOptions","pathOptions","highlightOptions","fitBounds","map","addGenericGeoJSONLayer","geoJSONOptions","featureLayer","$","isEmptyObject","extend","clusteredFeatureLayer","on","e","HTMLWidgets","shinyMode","Shiny","onInputChange","id","bounds","feature","permanent","once","evt","latLngBounds","eachFeature","layer","layerBounds","getBounds","addEsriHeatmapFeatureLayer","geoJsonOptions","heatmapFeatureLayer","addEsriTiledMapLayer","tiledMapLayer","addEsriDynamicMapLayer","popupFunction","dynamicMapLayer","bindPopup","addEsriImageMapLayer","imageMapLayer"],"mappings":"aACA,IAAAA,KAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,IACAG,EAAAH,EACAI,GAAA,EACAH,YAUA,OANAI,EAAAL,GAAAM,KAAAJ,EAAAD,QAAAC,IAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD,QAKAF,EAAAQ,EAAAF,EAGAN,EAAAS,EAAAV,EAGAC,EAAAU,EAAA,SAAAR,EAAAS,EAAAC,GACAZ,EAAAa,EAAAX,EAAAS,IACAG,OAAAC,eAAAb,EAAAS,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAZ,EAAAmB,EAAA,SAAAjB,GACAY,OAAAC,eAAAb,EAAA,cAAiDkB,OAAA,KAIjDpB,EAAAqB,EAAA,SAAAlB,GACA,IAA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rC,KAAAC,aAAAC,SAAA0C,EAAA,OAAA/C,EAAAC,IAGAN,cAAAC,QAAA2D,uBAAA,SACA7C,EAAAV,EAAAC,EAAAC,EAAAsD,EAAAnC,GAEA,IAAAI,EAAAtB,KACA4C,EAAAzC,EAAAC,KAAAkD,gBAAA5B,EAAAE,QAA+CrB,OAASR,QAIxD6C,EAAAd,GAAA,mBAAAC,GACAC,YAAAC,WACAC,MAAAC,cAAAb,EAAAc,GAAA,iCACOC,OAAAN,EAAAM,WAEPO,EAAAd,GAAA,gBAAAC,GACAC,YAAAC,WACAC,MAAAC,cAAAb,EAAAc,GAAA,8BACOC,OAAAN,EAAAM,WAGPgB,GACAT,EAAAW,UAAAF,EAAAnC,OAGAlB,KAAAC,aAAAC,SAAA0C,EAAA,OAAA/C,EAAAC,IAGAN,cAAAC,QAAA+D,qBAAA,SACAjD,EAAAV,EAAAC,EAAAC,EAAAsD,EAAAnC,GAEA,IAAAI,EAAAtB,KACA4C,EAAAzC,EAAAC,KAAAqD,cAAA/B,EAAAE,QAA6CrB,OAASR,QAItD6C,EAAAd,GAAA,mBAAAC,GACAC,YAAAC,WACAC,MAAAC,cAAAb,EAAAc,GAAA,+BACOC,OAAAN,EAAAM,WAEPO,EAAAd,GAAA,gBAAAC,GACAC,YAAAC,WACAC,MAAAC,cAAAb,EAAAc,GAAA,4BACOC,OAAAN,EAAAM,WAGPgB,GACAT,EAAAW,UAAAF,EAAAnC,OAGAlB,KAAAC,aAAAC,SAAA0C,EAAA,OAAA/C,EAAAC","file":"esri-leaflet-bindings.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","/* global LeafletWidget, $, L, Shiny, HTMLWidgets */\n\nLeafletWidget.methods.addEsriBasemapLayer = function(\n key, labelLayer, layerId, group, options\n) {\n this.layerManager.addLayer(\n L.esri.basemapLayer(key, options),\n 'tile', layerId, group);\n if(labelLayer) {\n this.layerManager.addLayer(\n L.esri.basemapLayer(labelLayer, options),\n 'tile', layerId, group);\n }\n};\n\n\nLeafletWidget.methods.addEsriFeatureLayer = function(\n url, options, layerId, group,\n markerType, markerIcons,\n markerIconProperty, markerOptions, markerIconFunction,\n clusterOptions, clusterId,\n labelProperty, labelOptions, popupProperty, popupOptions,\n pathOptions, highlightOptions, fitBounds\n) {\n var map = this;\n LeafletWidget.methods.addGenericGeoJSONLayer(\n map,\n function getGeoJSONLayer(geoJSONOptions){\n var featureLayer = null;\n if($.isEmptyObject(clusterOptions)){\n featureLayer = L.esri.featureLayer($.extend({url: url},\n options, pathOptions, geoJSONOptions));\n } else {\n featureLayer = L.esri.clusteredFeatureLayer($.extend({url: url},\n options, pathOptions, geoJSONOptions));\n }\n\n // events\n // http://esri.github.io/esri-leaflet/api-reference/layers/feature-layer.html\n\n featureLayer.on('loading', function(e) {\n if (!HTMLWidgets.shinyMode) return;\n Shiny.onInputChange(map.id+'_esri_featureLayer_loading',\n {'bounds': e.bounds});\n });\n featureLayer.on('load', function(e) {\n /* Will not work with an older version of ArcGIS Server\n if(fitBounds) {\n featureLayer.query().bounds(function (error, latlngbounds) {\n map.fitBounds(latlngbounds);\n });\n } */\n if (!HTMLWidgets.shinyMode) return;\n Shiny.onInputChange(map.id+'_esri_featureLayer_load',\n {'bounds': e.bounds});\n });\n featureLayer.on('createFeature', function(e) {\n if (!HTMLWidgets.shinyMode) return;\n Shiny.onInputChange(map.id+'_esri_featureLayer_createFeature',\n {'feature': e.feature});\n });\n featureLayer.on('removeFeature', function(e) {\n if (!HTMLWidgets.shinyMode) return;\n Shiny.onInputChange(map.id+'_esri_featureLayer_removeFeature',\n {'feature': e.feature, 'permanent' : e.permanent});\n });\n featureLayer.on('addFeature', function(e) {\n if (!HTMLWidgets.shinyMode) return;\n Shiny.onInputChange(map.id+'_esri_featureLayer_addFeature',\n {'feature': e.feature});\n });\n if(fitBounds) {\n featureLayer.once('load', function(evt) {\n // create a new empty Leaflet bounds object\n var bounds = L.latLngBounds([]);\n // loop through the features returned by the server\n featureLayer.eachFeature(function(layer) {\n // get the bounds of an individual feature\n var layerBounds = layer.getBounds();\n // extend the bounds of the collection to fit the bounds of the new feature\n bounds.extend(layerBounds);\n });\n\n // once we've looped through all the features, zoom the map to the extent of the collection\n map.fitBounds(bounds);\n });\n }\n\n // TODO do we need events from http://esri.github.io/esri-leaflet/api-reference/services/service.html ?\n\n return featureLayer;\n },\n layerId, group,\n false,\n markerType, markerIcons,\n markerIconProperty, markerOptions, markerIconFunction,\n null, null,\n labelProperty, labelOptions, popupProperty, popupOptions,\n pathOptions, highlightOptions\n );\n};\n\nLeafletWidget.methods.addEsriHeatmapFeatureLayer = function(\n url, layerId, group, options ) {\n var map = this;\n LeafletWidget.methods.addGenericGeoJSONLayer(\n map,\n function getGeoJSONLayer(geoJsonOptions){\n var heatmapFeatureLayer = L.esri.heatmapFeatureLayer($.extend({url: url}, options));\n // events\n // http://esri.github.io/esri-leaflet/api-reference/layers/heatmap-feature-layer.html\n\n heatmapFeatureLayer.on('loading', function(e) {\n if (!HTMLWidgets.shinyMode) return;\n Shiny.onInputChange(map.id+'_esri_heatmapFeatureLayer_loading',\n {'bounds': e.bounds});\n });\n heatmapFeatureLayer.on('load', function(e) {\n if (!HTMLWidgets.shinyMode) return;\n Shiny.onInputChange(map.id+'_esri_heatmapFeatureLayer_load',\n {'bounds': e.bounds});\n });\n return heatmapFeatureLayer;\n },\n layerId, group,\n false,\n null, null,\n null, null, null,\n null, null,\n null, null, null, null,\n {}, null\n );\n};\n\nLeafletWidget.methods.addEsriTiledMapLayer = function(\n url, layerId, group, options ) {\n\n var map = this;\n var layer = L.esri.tiledMapLayer($.extend({url: url}, options || {}));\n // events\n // https://esri.github.io/esri-leaflet/api-reference/layers/tiled-map-layer.html#events\n\n layer.on('loading', function(e) {\n if (!HTMLWidgets.shinyMode) return;\n Shiny.onInputChange(map.id+'_esri_tiledMapLayer_loading',\n {'bounds': e.bounds});\n });\n layer.on('load', function(e) {\n if (!HTMLWidgets.shinyMode) return;\n Shiny.onInputChange(map.id+'_esri_tiledMapLayer_load',\n {'bounds': e.bounds});\n });\n\n this.layerManager.addLayer(layer, 'tile', layerId, group);\n};\n\nLeafletWidget.methods.addEsriDynamicMapLayer = function(\n url, layerId, group, options, popupFunction, popupOptions ) {\n\n var map = this;\n var layer = L.esri.dynamicMapLayer($.extend({url: url}, options || {}));\n // events\n // https://esri.github.io/esri-leaflet/api-reference/layers/dynamic-map-layer.html#events\n\n layer.on('loading', function(e) {\n if (!HTMLWidgets.shinyMode) return;\n Shiny.onInputChange(map.id+'_esri_dynamicMapLayer_loading',\n {'bounds': e.bounds});\n });\n layer.on('load', function(e) {\n if (!HTMLWidgets.shinyMode) return;\n Shiny.onInputChange(map.id+'_esri_dynamicMapLayer_load',\n {'bounds': e.bounds});\n });\n\n if(popupFunction) {\n layer.bindPopup(popupFunction, popupOptions || {});\n }\n\n this.layerManager.addLayer(layer, 'tile', layerId, group);\n};\n\nLeafletWidget.methods.addEsriImageMapLayer = function(\n url, layerId, group, options, popupFunction, popupOptions ) {\n\n var map = this;\n var layer = L.esri.imageMapLayer($.extend({url: url}, options || {}));\n // events\n // https://esri.github.io/esri-leaflet/api-reference/layers/image-map-layer.html#events\n\n layer.on('loading', function(e) {\n if (!HTMLWidgets.shinyMode) return;\n Shiny.onInputChange(map.id+'_esri_imageMapLayer_loading',\n {'bounds': e.bounds});\n });\n layer.on('load', function(e) {\n if (!HTMLWidgets.shinyMode) return;\n Shiny.onInputChange(map.id+'_esri_imageMapLayer_load',\n {'bounds': e.bounds});\n });\n\n if(popupFunction) {\n layer.bindPopup(popupFunction, popupOptions || {});\n }\n\n this.layerManager.addLayer(layer, 'tile', layerId, group);\n};\n"],"sourceRoot":""}