{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///../demo7/src/js/pages/features/maps/google-maps.js"],"names":[],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;AClFa;;AAEb;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB,qBAAqB;AACrB;AACA,aAAa;AACb,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC,E","file":"js/pages/features/maps/google-maps.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, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\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 = \"../demo7/src/js/pages/features/maps/google-maps.js\");\n","\"use strict\";\r\n\r\n// Class definition\r\nvar KTGoogleMapsDemo = function() {\r\n\r\n // Private functions\r\n\r\n var demo1 = function() {\r\n var map = new GMaps({\r\n div: '#kt_gmap_1',\r\n lat: -12.043333,\r\n lng: -77.028333\r\n });\r\n }\r\n\r\n var demo2 = function() {\r\n var map = new GMaps({\r\n div: '#kt_gmap_2',\r\n zoom: 16,\r\n lat: -12.043333,\r\n lng: -77.028333,\r\n click: function(e) {\r\n alert('click');\r\n },\r\n dragend: function(e) {\r\n alert('dragend');\r\n }\r\n });\r\n }\r\n\r\n var demo3 = function() {\r\n var map = new GMaps({\r\n div: '#kt_gmap_3',\r\n lat: -51.38739,\r\n lng: -6.187181,\r\n });\r\n map.addMarker({\r\n lat: -51.38739,\r\n lng: -6.187181,\r\n title: 'Lima',\r\n details: {\r\n database_id: 42,\r\n author: 'HPNeo'\r\n },\r\n click: function(e) {\r\n if (console.log) console.log(e);\r\n alert('You clicked in this marker');\r\n }\r\n });\r\n map.addMarker({\r\n lat: -12.042,\r\n lng: -77.028333,\r\n title: 'Marker with InfoWindow',\r\n infoWindow: {\r\n content: 'HTML Content!'\r\n }\r\n });\r\n map.setZoom(5);\r\n }\r\n\r\n var demo4 = function() {\r\n var map = new GMaps({\r\n div: '#kt_gmap_4',\r\n lat: -12.043333,\r\n lng: -77.028333\r\n });\r\n\r\n GMaps.geolocate({\r\n success: function(position) {\r\n map.setCenter(position.coords.latitude, position.coords.longitude);\r\n },\r\n error: function(error) {\r\n alert('Geolocation failed: ' + error.message);\r\n },\r\n not_supported: function() {\r\n alert(\"Your browser does not support geolocation\");\r\n },\r\n always: function() {\r\n //alert(\"Geolocation Done!\");\r\n }\r\n });\r\n }\r\n\r\n var demo5 = function() {\r\n var map = new GMaps({\r\n div: '#kt_gmap_5',\r\n lat: -12.043333,\r\n lng: -77.028333,\r\n click: function(e) {\r\n console.log(e);\r\n }\r\n });\r\n\r\n var path = [\r\n [-12.044012922866312, -77.02470665341184],\r\n [-12.05449279282314, -77.03024273281858],\r\n [-12.055122327623378, -77.03039293652341],\r\n [-12.075917129727586, -77.02764635449216],\r\n [-12.07635776902266, -77.02792530422971],\r\n [-12.076819390363665, -77.02893381481931],\r\n [-12.088527520066453, -77.0241058385925],\r\n [-12.090814532191756, -77.02271108990476]\r\n ];\r\n\r\n map.drawPolyline({\r\n path: path,\r\n strokeColor: '#131540',\r\n strokeOpacity: 0.6,\r\n strokeWeight: 6\r\n });\r\n }\r\n\r\n var demo6 = function() {\r\n var map = new GMaps({\r\n div: '#kt_gmap_6',\r\n lat: -12.043333,\r\n lng: -77.028333\r\n });\r\n\r\n var path = [\r\n [-12.040397656836609, -77.03373871559225],\r\n [-12.040248585302038, -77.03993927003302],\r\n [-12.050047116528843, -77.02448169303511],\r\n [-12.044804866577001, -77.02154422636042]\r\n ];\r\n\r\n var polygon = map.drawPolygon({\r\n paths: path,\r\n strokeColor: '#BBD8E9',\r\n strokeOpacity: 1,\r\n strokeWeight: 3,\r\n fillColor: '#BBD8E9',\r\n fillOpacity: 0.6\r\n });\r\n }\r\n\r\n var demo7 = function() {\r\n var map = new GMaps({\r\n div: '#kt_gmap_7',\r\n lat: -12.043333,\r\n lng: -77.028333\r\n });\r\n $('#kt_gmap_7_btn').click(function(e) {\r\n e.preventDefault();\r\n KTUtil.scrollTo('kt_gmap_7_btn', 400);\r\n map.travelRoute({\r\n origin: [-12.044012922866312, -77.02470665341184],\r\n destination: [-12.090814532191756, -77.02271108990476],\r\n travelMode: 'driving',\r\n step: function(e) {\r\n $('#kt_gmap_7_routes').append('
  • ' + e.instructions + '
  • ');\r\n $('#kt_gmap_7_routes li:eq(' + e.step_number + ')').delay(800 * e.step_number).fadeIn(500, function() {\r\n map.setCenter(e.end_location.lat(), e.end_location.lng());\r\n map.drawPolyline({\r\n path: e.path,\r\n strokeColor: '#131540',\r\n strokeOpacity: 0.6,\r\n strokeWeight: 6\r\n });\r\n });\r\n }\r\n });\r\n });\r\n }\r\n\r\n var demo8 = function() {\r\n var map = new GMaps({\r\n div: '#kt_gmap_8',\r\n lat: -12.043333,\r\n lng: -77.028333\r\n });\r\n\r\n var handleAction = function() {\r\n var text = $.trim($('#kt_gmap_8_address').val());\r\n GMaps.geocode({\r\n address: text,\r\n callback: function(results, status) {\r\n if (status == 'OK') {\r\n var latlng = results[0].geometry.location;\r\n map.setCenter(latlng.lat(), latlng.lng());\r\n map.addMarker({\r\n lat: latlng.lat(),\r\n lng: latlng.lng()\r\n });\r\n KTUtil.scrollTo('kt_gmap_8');\r\n }\r\n }\r\n });\r\n }\r\n\r\n $('#kt_gmap_8_btn').click(function(e) {\r\n e.preventDefault();\r\n handleAction();\r\n });\r\n\r\n $(\"#kt_gmap_8_address\").keypress(function(e) {\r\n var keycode = (e.keyCode ? e.keyCode : e.which);\r\n if (keycode == '13') {\r\n e.preventDefault();\r\n handleAction();\r\n }\r\n });\r\n }\r\n\r\n return {\r\n // public functions\r\n init: function() {\r\n // default charts\r\n demo1();\r\n demo2();\r\n demo3();\r\n demo4();\r\n demo5();\r\n demo6();\r\n demo7();\r\n demo8();\r\n }\r\n };\r\n}();\r\n\r\njQuery(document).ready(function() {\r\n KTGoogleMapsDemo.init();\r\n});"],"sourceRoot":""}