@styzy/vue-amap 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1535 @@
1
+ (function webpackUniversalModuleDefinition(root, factory) {
2
+ if(typeof exports === 'object' && typeof module === 'object')
3
+ module.exports = factory();
4
+ else if(typeof define === 'function' && define.amd)
5
+ define([], factory);
6
+ else if(typeof exports === 'object')
7
+ exports["vue-amap"] = factory();
8
+ else
9
+ root["vue-amap"] = factory();
10
+ })((typeof self !== 'undefined' ? self : this), function() {
11
+ return /******/ (function(modules) { // webpackBootstrap
12
+ /******/ // The module cache
13
+ /******/ var installedModules = {};
14
+ /******/
15
+ /******/ // The require function
16
+ /******/ function __webpack_require__(moduleId) {
17
+ /******/
18
+ /******/ // Check if module is in cache
19
+ /******/ if(installedModules[moduleId]) {
20
+ /******/ return installedModules[moduleId].exports;
21
+ /******/ }
22
+ /******/ // Create a new module (and put it into the cache)
23
+ /******/ var module = installedModules[moduleId] = {
24
+ /******/ i: moduleId,
25
+ /******/ l: false,
26
+ /******/ exports: {}
27
+ /******/ };
28
+ /******/
29
+ /******/ // Execute the module function
30
+ /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
31
+ /******/
32
+ /******/ // Flag the module as loaded
33
+ /******/ module.l = true;
34
+ /******/
35
+ /******/ // Return the exports of the module
36
+ /******/ return module.exports;
37
+ /******/ }
38
+ /******/
39
+ /******/
40
+ /******/ // expose the modules object (__webpack_modules__)
41
+ /******/ __webpack_require__.m = modules;
42
+ /******/
43
+ /******/ // expose the module cache
44
+ /******/ __webpack_require__.c = installedModules;
45
+ /******/
46
+ /******/ // define getter function for harmony exports
47
+ /******/ __webpack_require__.d = function(exports, name, getter) {
48
+ /******/ if(!__webpack_require__.o(exports, name)) {
49
+ /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
50
+ /******/ }
51
+ /******/ };
52
+ /******/
53
+ /******/ // define __esModule on exports
54
+ /******/ __webpack_require__.r = function(exports) {
55
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
56
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
57
+ /******/ }
58
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
59
+ /******/ };
60
+ /******/
61
+ /******/ // create a fake namespace object
62
+ /******/ // mode & 1: value is a module id, require it
63
+ /******/ // mode & 2: merge all properties of value into the ns
64
+ /******/ // mode & 4: return value when already ns object
65
+ /******/ // mode & 8|1: behave like require
66
+ /******/ __webpack_require__.t = function(value, mode) {
67
+ /******/ if(mode & 1) value = __webpack_require__(value);
68
+ /******/ if(mode & 8) return value;
69
+ /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
70
+ /******/ var ns = Object.create(null);
71
+ /******/ __webpack_require__.r(ns);
72
+ /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
73
+ /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
74
+ /******/ return ns;
75
+ /******/ };
76
+ /******/
77
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
78
+ /******/ __webpack_require__.n = function(module) {
79
+ /******/ var getter = module && module.__esModule ?
80
+ /******/ function getDefault() { return module['default']; } :
81
+ /******/ function getModuleExports() { return module; };
82
+ /******/ __webpack_require__.d(getter, 'a', getter);
83
+ /******/ return getter;
84
+ /******/ };
85
+ /******/
86
+ /******/ // Object.prototype.hasOwnProperty.call
87
+ /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
88
+ /******/
89
+ /******/ // __webpack_public_path__
90
+ /******/ __webpack_require__.p = "";
91
+ /******/
92
+ /******/
93
+ /******/ // Load entry module and return exports
94
+ /******/ return __webpack_require__(__webpack_require__.s = "fb15");
95
+ /******/ })
96
+ /************************************************************************/
97
+ /******/ ({
98
+
99
+ /***/ "18f4":
100
+ /***/ (function(module, exports, __webpack_require__) {
101
+
102
+ // Imports
103
+ var ___CSS_LOADER_API_IMPORT___ = __webpack_require__("24fb");
104
+ exports = ___CSS_LOADER_API_IMPORT___(false);
105
+ // Module
106
+ exports.push([module.i, ".amap-sug-result{display:none}", ""]);
107
+ // Exports
108
+ module.exports = exports;
109
+
110
+
111
+ /***/ }),
112
+
113
+ /***/ "24fb":
114
+ /***/ (function(module, exports, __webpack_require__) {
115
+
116
+ "use strict";
117
+
118
+
119
+ /*
120
+ MIT License http://www.opensource.org/licenses/mit-license.php
121
+ Author Tobias Koppers @sokra
122
+ */
123
+ // css base code, injected by the css-loader
124
+ // eslint-disable-next-line func-names
125
+ module.exports = function (useSourceMap) {
126
+ var list = []; // return the list of modules as css string
127
+
128
+ list.toString = function toString() {
129
+ return this.map(function (item) {
130
+ var content = cssWithMappingToString(item, useSourceMap);
131
+
132
+ if (item[2]) {
133
+ return "@media ".concat(item[2], " {").concat(content, "}");
134
+ }
135
+
136
+ return content;
137
+ }).join('');
138
+ }; // import a list of modules into the list
139
+ // eslint-disable-next-line func-names
140
+
141
+
142
+ list.i = function (modules, mediaQuery, dedupe) {
143
+ if (typeof modules === 'string') {
144
+ // eslint-disable-next-line no-param-reassign
145
+ modules = [[null, modules, '']];
146
+ }
147
+
148
+ var alreadyImportedModules = {};
149
+
150
+ if (dedupe) {
151
+ for (var i = 0; i < this.length; i++) {
152
+ // eslint-disable-next-line prefer-destructuring
153
+ var id = this[i][0];
154
+
155
+ if (id != null) {
156
+ alreadyImportedModules[id] = true;
157
+ }
158
+ }
159
+ }
160
+
161
+ for (var _i = 0; _i < modules.length; _i++) {
162
+ var item = [].concat(modules[_i]);
163
+
164
+ if (dedupe && alreadyImportedModules[item[0]]) {
165
+ // eslint-disable-next-line no-continue
166
+ continue;
167
+ }
168
+
169
+ if (mediaQuery) {
170
+ if (!item[2]) {
171
+ item[2] = mediaQuery;
172
+ } else {
173
+ item[2] = "".concat(mediaQuery, " and ").concat(item[2]);
174
+ }
175
+ }
176
+
177
+ list.push(item);
178
+ }
179
+ };
180
+
181
+ return list;
182
+ };
183
+
184
+ function cssWithMappingToString(item, useSourceMap) {
185
+ var content = item[1] || ''; // eslint-disable-next-line prefer-destructuring
186
+
187
+ var cssMapping = item[3];
188
+
189
+ if (!cssMapping) {
190
+ return content;
191
+ }
192
+
193
+ if (useSourceMap && typeof btoa === 'function') {
194
+ var sourceMapping = toComment(cssMapping);
195
+ var sourceURLs = cssMapping.sources.map(function (source) {
196
+ return "/*# sourceURL=".concat(cssMapping.sourceRoot || '').concat(source, " */");
197
+ });
198
+ return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
199
+ }
200
+
201
+ return [content].join('\n');
202
+ } // Adapted from convert-source-map (MIT)
203
+
204
+
205
+ function toComment(sourceMap) {
206
+ // eslint-disable-next-line no-undef
207
+ var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
208
+ var data = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64);
209
+ return "/*# ".concat(data, " */");
210
+ }
211
+
212
+ /***/ }),
213
+
214
+ /***/ "2cc0":
215
+ /***/ (function(module, exports, __webpack_require__) {
216
+
217
+ // style-loader: Adds some css to the DOM by adding a <style> tag
218
+
219
+ // load the styles
220
+ var content = __webpack_require__("18f4");
221
+ if(content.__esModule) content = content.default;
222
+ if(typeof content === 'string') content = [[module.i, content, '']];
223
+ if(content.locals) module.exports = content.locals;
224
+ // add the styles to the DOM
225
+ var add = __webpack_require__("499e").default
226
+ var update = add("37432b0a", content, true, {"sourceMap":false,"shadowMode":false});
227
+
228
+ /***/ }),
229
+
230
+ /***/ "3a4c":
231
+ /***/ (function(module, exports, __webpack_require__) {
232
+
233
+ // style-loader: Adds some css to the DOM by adding a <style> tag
234
+
235
+ // load the styles
236
+ var content = __webpack_require__("50bd");
237
+ if(content.__esModule) content = content.default;
238
+ if(typeof content === 'string') content = [[module.i, content, '']];
239
+ if(content.locals) module.exports = content.locals;
240
+ // add the styles to the DOM
241
+ var add = __webpack_require__("499e").default
242
+ var update = add("329bbec2", content, true, {"sourceMap":false,"shadowMode":false});
243
+
244
+ /***/ }),
245
+
246
+ /***/ "499e":
247
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
248
+
249
+ "use strict";
250
+ // ESM COMPAT FLAG
251
+ __webpack_require__.r(__webpack_exports__);
252
+
253
+ // EXPORTS
254
+ __webpack_require__.d(__webpack_exports__, "default", function() { return /* binding */ addStylesClient; });
255
+
256
+ // CONCATENATED MODULE: ./node_modules/vue-style-loader/lib/listToStyles.js
257
+ /**
258
+ * Translates the list format produced by css-loader into something
259
+ * easier to manipulate.
260
+ */
261
+ function listToStyles (parentId, list) {
262
+ var styles = []
263
+ var newStyles = {}
264
+ for (var i = 0; i < list.length; i++) {
265
+ var item = list[i]
266
+ var id = item[0]
267
+ var css = item[1]
268
+ var media = item[2]
269
+ var sourceMap = item[3]
270
+ var part = {
271
+ id: parentId + ':' + i,
272
+ css: css,
273
+ media: media,
274
+ sourceMap: sourceMap
275
+ }
276
+ if (!newStyles[id]) {
277
+ styles.push(newStyles[id] = { id: id, parts: [part] })
278
+ } else {
279
+ newStyles[id].parts.push(part)
280
+ }
281
+ }
282
+ return styles
283
+ }
284
+
285
+ // CONCATENATED MODULE: ./node_modules/vue-style-loader/lib/addStylesClient.js
286
+ /*
287
+ MIT License http://www.opensource.org/licenses/mit-license.php
288
+ Author Tobias Koppers @sokra
289
+ Modified by Evan You @yyx990803
290
+ */
291
+
292
+
293
+
294
+ var hasDocument = typeof document !== 'undefined'
295
+
296
+ if (typeof DEBUG !== 'undefined' && DEBUG) {
297
+ if (!hasDocument) {
298
+ throw new Error(
299
+ 'vue-style-loader cannot be used in a non-browser environment. ' +
300
+ "Use { target: 'node' } in your Webpack config to indicate a server-rendering environment."
301
+ ) }
302
+ }
303
+
304
+ /*
305
+ type StyleObject = {
306
+ id: number;
307
+ parts: Array<StyleObjectPart>
308
+ }
309
+
310
+ type StyleObjectPart = {
311
+ css: string;
312
+ media: string;
313
+ sourceMap: ?string
314
+ }
315
+ */
316
+
317
+ var stylesInDom = {/*
318
+ [id: number]: {
319
+ id: number,
320
+ refs: number,
321
+ parts: Array<(obj?: StyleObjectPart) => void>
322
+ }
323
+ */}
324
+
325
+ var head = hasDocument && (document.head || document.getElementsByTagName('head')[0])
326
+ var singletonElement = null
327
+ var singletonCounter = 0
328
+ var isProduction = false
329
+ var noop = function () {}
330
+ var options = null
331
+ var ssrIdKey = 'data-vue-ssr-id'
332
+
333
+ // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
334
+ // tags it will allow on a page
335
+ var isOldIE = typeof navigator !== 'undefined' && /msie [6-9]\b/.test(navigator.userAgent.toLowerCase())
336
+
337
+ function addStylesClient (parentId, list, _isProduction, _options) {
338
+ isProduction = _isProduction
339
+
340
+ options = _options || {}
341
+
342
+ var styles = listToStyles(parentId, list)
343
+ addStylesToDom(styles)
344
+
345
+ return function update (newList) {
346
+ var mayRemove = []
347
+ for (var i = 0; i < styles.length; i++) {
348
+ var item = styles[i]
349
+ var domStyle = stylesInDom[item.id]
350
+ domStyle.refs--
351
+ mayRemove.push(domStyle)
352
+ }
353
+ if (newList) {
354
+ styles = listToStyles(parentId, newList)
355
+ addStylesToDom(styles)
356
+ } else {
357
+ styles = []
358
+ }
359
+ for (var i = 0; i < mayRemove.length; i++) {
360
+ var domStyle = mayRemove[i]
361
+ if (domStyle.refs === 0) {
362
+ for (var j = 0; j < domStyle.parts.length; j++) {
363
+ domStyle.parts[j]()
364
+ }
365
+ delete stylesInDom[domStyle.id]
366
+ }
367
+ }
368
+ }
369
+ }
370
+
371
+ function addStylesToDom (styles /* Array<StyleObject> */) {
372
+ for (var i = 0; i < styles.length; i++) {
373
+ var item = styles[i]
374
+ var domStyle = stylesInDom[item.id]
375
+ if (domStyle) {
376
+ domStyle.refs++
377
+ for (var j = 0; j < domStyle.parts.length; j++) {
378
+ domStyle.parts[j](item.parts[j])
379
+ }
380
+ for (; j < item.parts.length; j++) {
381
+ domStyle.parts.push(addStyle(item.parts[j]))
382
+ }
383
+ if (domStyle.parts.length > item.parts.length) {
384
+ domStyle.parts.length = item.parts.length
385
+ }
386
+ } else {
387
+ var parts = []
388
+ for (var j = 0; j < item.parts.length; j++) {
389
+ parts.push(addStyle(item.parts[j]))
390
+ }
391
+ stylesInDom[item.id] = { id: item.id, refs: 1, parts: parts }
392
+ }
393
+ }
394
+ }
395
+
396
+ function createStyleElement () {
397
+ var styleElement = document.createElement('style')
398
+ styleElement.type = 'text/css'
399
+ head.appendChild(styleElement)
400
+ return styleElement
401
+ }
402
+
403
+ function addStyle (obj /* StyleObjectPart */) {
404
+ var update, remove
405
+ var styleElement = document.querySelector('style[' + ssrIdKey + '~="' + obj.id + '"]')
406
+
407
+ if (styleElement) {
408
+ if (isProduction) {
409
+ // has SSR styles and in production mode.
410
+ // simply do nothing.
411
+ return noop
412
+ } else {
413
+ // has SSR styles but in dev mode.
414
+ // for some reason Chrome can't handle source map in server-rendered
415
+ // style tags - source maps in <style> only works if the style tag is
416
+ // created and inserted dynamically. So we remove the server rendered
417
+ // styles and inject new ones.
418
+ styleElement.parentNode.removeChild(styleElement)
419
+ }
420
+ }
421
+
422
+ if (isOldIE) {
423
+ // use singleton mode for IE9.
424
+ var styleIndex = singletonCounter++
425
+ styleElement = singletonElement || (singletonElement = createStyleElement())
426
+ update = applyToSingletonTag.bind(null, styleElement, styleIndex, false)
427
+ remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true)
428
+ } else {
429
+ // use multi-style-tag mode in all other cases
430
+ styleElement = createStyleElement()
431
+ update = applyToTag.bind(null, styleElement)
432
+ remove = function () {
433
+ styleElement.parentNode.removeChild(styleElement)
434
+ }
435
+ }
436
+
437
+ update(obj)
438
+
439
+ return function updateStyle (newObj /* StyleObjectPart */) {
440
+ if (newObj) {
441
+ if (newObj.css === obj.css &&
442
+ newObj.media === obj.media &&
443
+ newObj.sourceMap === obj.sourceMap) {
444
+ return
445
+ }
446
+ update(obj = newObj)
447
+ } else {
448
+ remove()
449
+ }
450
+ }
451
+ }
452
+
453
+ var replaceText = (function () {
454
+ var textStore = []
455
+
456
+ return function (index, replacement) {
457
+ textStore[index] = replacement
458
+ return textStore.filter(Boolean).join('\n')
459
+ }
460
+ })()
461
+
462
+ function applyToSingletonTag (styleElement, index, remove, obj) {
463
+ var css = remove ? '' : obj.css
464
+
465
+ if (styleElement.styleSheet) {
466
+ styleElement.styleSheet.cssText = replaceText(index, css)
467
+ } else {
468
+ var cssNode = document.createTextNode(css)
469
+ var childNodes = styleElement.childNodes
470
+ if (childNodes[index]) styleElement.removeChild(childNodes[index])
471
+ if (childNodes.length) {
472
+ styleElement.insertBefore(cssNode, childNodes[index])
473
+ } else {
474
+ styleElement.appendChild(cssNode)
475
+ }
476
+ }
477
+ }
478
+
479
+ function applyToTag (styleElement, obj) {
480
+ var css = obj.css
481
+ var media = obj.media
482
+ var sourceMap = obj.sourceMap
483
+
484
+ if (media) {
485
+ styleElement.setAttribute('media', media)
486
+ }
487
+ if (options.ssrId) {
488
+ styleElement.setAttribute(ssrIdKey, obj.id)
489
+ }
490
+
491
+ if (sourceMap) {
492
+ // https://developer.chrome.com/devtools/docs/javascript-debugging
493
+ // this makes source maps inside style tags work properly in Chrome
494
+ css += '\n/*# sourceURL=' + sourceMap.sources[0] + ' */'
495
+ // http://stackoverflow.com/a/26603875
496
+ css += '\n/*# sourceMappingURL=data:application/json;base64,' + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + ' */'
497
+ }
498
+
499
+ if (styleElement.styleSheet) {
500
+ styleElement.styleSheet.cssText = css
501
+ } else {
502
+ while (styleElement.firstChild) {
503
+ styleElement.removeChild(styleElement.firstChild)
504
+ }
505
+ styleElement.appendChild(document.createTextNode(css))
506
+ }
507
+ }
508
+
509
+
510
+ /***/ }),
511
+
512
+ /***/ "50bd":
513
+ /***/ (function(module, exports, __webpack_require__) {
514
+
515
+ // Imports
516
+ var ___CSS_LOADER_API_IMPORT___ = __webpack_require__("24fb");
517
+ exports = ___CSS_LOADER_API_IMPORT___(false);
518
+ // Module
519
+ exports.push([module.i, ".v-amap-ctn[data-v-37c06024],.v-amap-ctn .v-amap[data-v-37c06024]{height:100%}", ""]);
520
+ // Exports
521
+ module.exports = exports;
522
+
523
+
524
+ /***/ }),
525
+
526
+ /***/ "61d4":
527
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
528
+
529
+ "use strict";
530
+ /* harmony import */ var _node_modules_vue_style_loader_index_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_3_node_modules_stylus_loader_index_js_ref_11_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_VAMapPlaceSearchInput_vue_vue_type_style_index_0_id_57fd4556_prod_lang_stylus_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("c5a6");
531
+ /* harmony import */ var _node_modules_vue_style_loader_index_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_3_node_modules_stylus_loader_index_js_ref_11_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_VAMapPlaceSearchInput_vue_vue_type_style_index_0_id_57fd4556_prod_lang_stylus_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_style_loader_index_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_3_node_modules_stylus_loader_index_js_ref_11_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_VAMapPlaceSearchInput_vue_vue_type_style_index_0_id_57fd4556_prod_lang_stylus_scoped_true___WEBPACK_IMPORTED_MODULE_0__);
532
+ /* unused harmony reexport * */
533
+
534
+
535
+ /***/ }),
536
+
537
+ /***/ "b661":
538
+ /***/ (function(module, exports, __webpack_require__) {
539
+
540
+ // Imports
541
+ var ___CSS_LOADER_API_IMPORT___ = __webpack_require__("24fb");
542
+ exports = ___CSS_LOADER_API_IMPORT___(false);
543
+ // Module
544
+ exports.push([module.i, ".v-amap-place-search-input input[data-v-57fd4556]{display:inline-block;box-sizing:border-box;padding:0 15px;width:100%;height:40px;outline:0;border:1px solid #dcdfe6;border-radius:4px;background-color:#fff;background-image:none;color:#606266;font-size:inherit;line-height:40px;transition:border-color .2s cubic-bezier(.645,.045,.355,1);-webkit-appearance:none}", ""]);
545
+ // Exports
546
+ module.exports = exports;
547
+
548
+
549
+ /***/ }),
550
+
551
+ /***/ "c5a3":
552
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
553
+
554
+ "use strict";
555
+ /* harmony import */ var _node_modules_vue_style_loader_index_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_3_node_modules_stylus_loader_index_js_ref_11_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_VAMap_vue_vue_type_style_index_0_id_37c06024_prod_lang_stylus_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("3a4c");
556
+ /* harmony import */ var _node_modules_vue_style_loader_index_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_3_node_modules_stylus_loader_index_js_ref_11_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_VAMap_vue_vue_type_style_index_0_id_37c06024_prod_lang_stylus_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_style_loader_index_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_3_node_modules_stylus_loader_index_js_ref_11_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_VAMap_vue_vue_type_style_index_0_id_37c06024_prod_lang_stylus_scoped_true___WEBPACK_IMPORTED_MODULE_0__);
557
+ /* unused harmony reexport * */
558
+
559
+
560
+ /***/ }),
561
+
562
+ /***/ "c5a6":
563
+ /***/ (function(module, exports, __webpack_require__) {
564
+
565
+ // style-loader: Adds some css to the DOM by adding a <style> tag
566
+
567
+ // load the styles
568
+ var content = __webpack_require__("b661");
569
+ if(content.__esModule) content = content.default;
570
+ if(typeof content === 'string') content = [[module.i, content, '']];
571
+ if(content.locals) module.exports = content.locals;
572
+ // add the styles to the DOM
573
+ var add = __webpack_require__("499e").default
574
+ var update = add("1e99f6c0", content, true, {"sourceMap":false,"shadowMode":false});
575
+
576
+ /***/ }),
577
+
578
+ /***/ "fb15":
579
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
580
+
581
+ "use strict";
582
+ // ESM COMPAT FLAG
583
+ __webpack_require__.r(__webpack_exports__);
584
+
585
+ // EXPORTS
586
+ __webpack_require__.d(__webpack_exports__, "AMapLoader", function() { return /* reexport */ loader; });
587
+
588
+ // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
589
+ // This file is imported into lib/wc client bundles.
590
+
591
+ if (typeof window !== 'undefined') {
592
+ var currentScript = window.document.currentScript
593
+ if (false) { var getCurrentScript; }
594
+
595
+ var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/)
596
+ if (src) {
597
+ __webpack_require__.p = src[1] // eslint-disable-line
598
+ }
599
+ }
600
+
601
+ // Indicate to webpack that this file can be concatenated
602
+ /* harmony default export */ var setPublicPath = (null);
603
+
604
+ // CONCATENATED MODULE: ./src/CONSTANTS/index.js
605
+ const CONSTANTS = {
606
+ SDK_URL: 'https://webapi.amap.com/maps',
607
+ CALLBACK_NAME: 'aMapInitCallback'
608
+ }
609
+
610
+ /* harmony default export */ var src_CONSTANTS = (CONSTANTS);
611
+
612
+ // CONCATENATED MODULE: ./src/loader/index.js
613
+
614
+
615
+ class loader_Loader {
616
+ get key() {
617
+ return this._key
618
+ }
619
+ get version() {
620
+ return this._version
621
+ }
622
+ get uiVersion() {
623
+ return this._uiVersion
624
+ }
625
+ get plugins() {
626
+ return this._plugins
627
+ }
628
+ get sdkUrl() {
629
+ return `${src_CONSTANTS.SDK_URL}?v=${this.version}&key=${
630
+ this.key
631
+ }&callback=${this.callbackName}&plugin=${this.plugins.join(',')}`
632
+ }
633
+ get uiSdkUrl() {
634
+ return `https://webapi.amap.com/ui/${this.uiVersion}/main-async.js`
635
+ }
636
+ get callbackName() {
637
+ return this._callbackName
638
+ }
639
+ get isSdkLoaded() {
640
+ return this._isSdkLoaded
641
+ }
642
+ get isSdkLoading() {
643
+ return this._isSdkLoading
644
+ }
645
+ get callbacks() {
646
+ return this._callbacks
647
+ }
648
+ constructor() {
649
+ this._loadCallback = null
650
+ this._callbackName = `${src_CONSTANTS.CALLBACK_NAME}_${Date.now()}`
651
+ this._isSdkLoaded = false
652
+ this._isSdkLoading = false
653
+ this._callbacks = []
654
+ }
655
+ _loadScript(url, callback) {
656
+ let el_script = document.createElement('script')
657
+ el_script.charset = 'utf-8'
658
+ el_script.src = url
659
+
660
+ if (el_script.addEventListener) {
661
+ el_script.addEventListener('load', () => {
662
+ callback && callback()
663
+ })
664
+ } else if (el_script.attachEvent) {
665
+ el_script.attachEvent('onreadystatechange', () => {
666
+ let target = window.event.srcElement
667
+ if (target.readyState == 'loaded') {
668
+ callback && callback()
669
+ }
670
+ })
671
+ }
672
+ document.head.appendChild(el_script)
673
+ }
674
+ config({ key = '', version = '', uiVersion = '', plugins } = {}) {
675
+ this._key = key
676
+ this._version = version
677
+ this._uiVersion = uiVersion
678
+ this._plugins = plugins
679
+ }
680
+ async load() {
681
+ if (this.isSdkLoaded) return window.AMap
682
+
683
+ if (this.isSdkLoading)
684
+ return new Promise(resolve => {
685
+ this.callbacks.push(() => {
686
+ resolve(window.AMap)
687
+ })
688
+ })
689
+
690
+ return new Promise(resolve => {
691
+ this._isSdkLoading = true
692
+
693
+ window[this.callbackName] = () => {
694
+ this._isSdkLoaded = true
695
+ this._isSdkLoading = false
696
+
697
+ if (this.uiVersion) {
698
+ window.initAMapUI()
699
+ }
700
+
701
+ delete window[this.callbackName]
702
+ resolve(window.AMap)
703
+
704
+ this.callbacks.forEach(callback => {
705
+ callback && callback()
706
+ })
707
+
708
+ this._callbacks = []
709
+ }
710
+ if (this.uiVersion) {
711
+ this._loadScript(this.uiSdkUrl, () => {
712
+ this._loadScript(this.sdkUrl)
713
+ })
714
+ } else {
715
+ this._loadScript(this.sdkUrl)
716
+ }
717
+ })
718
+ }
719
+ }
720
+
721
+ /* harmony default export */ var loader = (new loader_Loader());
722
+
723
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"62109407-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/pug-plain-loader!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/Components/VAMap.vue?vue&type=template&id=37c06024&scoped=true&lang=pug&
724
+ var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"v-amap-ctn"},[_c('div',{ref:"aMap",staticClass:"v-amap"}),(_vm.AMap && _vm.aMap)?[_vm._t("default",null,{"AMap":_vm.AMap,"aMap":_vm.aMap})]:_vm._e()],2)
725
+ }
726
+ var staticRenderFns = []
727
+
728
+
729
+ // CONCATENATED MODULE: ./src/Components/VAMap.vue?vue&type=template&id=37c06024&scoped=true&lang=pug&
730
+
731
+ // CONCATENATED MODULE: ./src/utils/listenerProxy.js
732
+ const listenerProxy = (aMapObject, vm) => {
733
+ const listeners = vm.$listeners
734
+
735
+ for (const event in listeners) {
736
+ if (Object.hasOwnProperty.call(listeners, event)) {
737
+ const handler = listeners[event]
738
+
739
+ aMapObject.on(event, (...args) => {
740
+ handler(...args)
741
+ })
742
+ }
743
+ }
744
+ }
745
+
746
+ /* harmony default export */ var utils_listenerProxy = (listenerProxy);
747
+
748
+ // CONCATENATED MODULE: ./src/utils/typeOf.js
749
+ const typeOf = function (param) {
750
+ return Object.prototype.toString.call(param).match(/\s+(\w+)/)[1]
751
+ }
752
+
753
+ /* harmony default export */ var utils_typeOf = (typeOf);
754
+
755
+ // CONCATENATED MODULE: ./src/utils/watchProps.js
756
+
757
+
758
+ const watchProps = (aMapObject, vm, props) => {
759
+ props
760
+ .map(prop => {
761
+ if (utils_typeOf(prop) === 'String')
762
+ return { prop, watchProp: `$attrs.${prop}` }
763
+ if (utils_typeOf(prop) === 'Array')
764
+ return {
765
+ prop: prop[0],
766
+ watchProp: `$attrs.${prop[0]}`,
767
+ handler: prop[1]
768
+ }
769
+ })
770
+ .forEach(({ watchProp, prop, handler }) => {
771
+ vm.$watch(watchProp, (newValue, oldValue) => {
772
+ try {
773
+ if (handler) {
774
+ handler.call(vm, aMapObject, newValue, oldValue)
775
+ } else {
776
+ aMapObject[
777
+ `set${prop.replace(prop[0], prop[0].toUpperCase())}`
778
+ ](newValue)
779
+ }
780
+ } catch (error) {
781
+ // eslint-disable-next-line
782
+ console.error('Props watch error:', error)
783
+ }
784
+ })
785
+ })
786
+ }
787
+
788
+ /* harmony default export */ var utils_watchProps = (watchProps);
789
+
790
+ // CONCATENATED MODULE: ./src/utils/index.js
791
+
792
+
793
+
794
+
795
+
796
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/Components/VAMap.vue?vue&type=script&lang=js&
797
+
798
+
799
+
800
+
801
+ const watchedProps = [
802
+ 'zoom',
803
+ [
804
+ 'center',
805
+ function (aMap, newValue, oldValue) {
806
+ if (newValue === oldValue) return
807
+ aMap.setCenter(newValue)
808
+ }
809
+ ],
810
+ 'labelzIndex',
811
+ 'lang',
812
+ 'defaultCursor',
813
+ 'features',
814
+ 'mapStyle',
815
+ 'pitch'
816
+ ]
817
+
818
+ /* harmony default export */ var VAMapvue_type_script_lang_js_ = ({
819
+ name: 'VAMap',
820
+ data() {
821
+ return {
822
+ AMap: null,
823
+ aMap: null
824
+ }
825
+ },
826
+ created() {
827
+ this._createMap()
828
+ },
829
+ destroyed() {
830
+ this._destroyMap()
831
+ },
832
+ methods: {
833
+ async _createMap() {
834
+ this.AMap = await loader.load()
835
+
836
+ const options = Object.assign(
837
+ {},
838
+ src_0.globalMapOptions,
839
+ this.$attrs
840
+ )
841
+
842
+ this.aMap = new this.AMap.Map(this.$refs.aMap, options)
843
+
844
+ utils_listenerProxy(this.aMap, this)
845
+ utils_watchProps(this.aMap, this, watchedProps)
846
+
847
+ this.$emit('init', this.aMap, this.AMap)
848
+ },
849
+ _destroyMap() {
850
+ this.aMap && this.aMap.destroy()
851
+ },
852
+ addMarker(marker) {
853
+ this.aMap && this.aMap.add(marker)
854
+ },
855
+ removeMarker(marker) {
856
+ this.aMap && this.aMap.remove(marker)
857
+ }
858
+ }
859
+ });
860
+
861
+ // CONCATENATED MODULE: ./src/Components/VAMap.vue?vue&type=script&lang=js&
862
+ /* harmony default export */ var Components_VAMapvue_type_script_lang_js_ = (VAMapvue_type_script_lang_js_);
863
+ // EXTERNAL MODULE: ./src/Components/VAMap.vue?vue&type=style&index=0&id=37c06024&prod&lang=stylus&scoped=true&
864
+ var VAMapvue_type_style_index_0_id_37c06024_prod_lang_stylus_scoped_true_ = __webpack_require__("c5a3");
865
+
866
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
867
+ /* globals __VUE_SSR_CONTEXT__ */
868
+
869
+ // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
870
+ // This module is a runtime utility for cleaner component module output and will
871
+ // be included in the final webpack user bundle.
872
+
873
+ function normalizeComponent(
874
+ scriptExports,
875
+ render,
876
+ staticRenderFns,
877
+ functionalTemplate,
878
+ injectStyles,
879
+ scopeId,
880
+ moduleIdentifier /* server only */,
881
+ shadowMode /* vue-cli only */
882
+ ) {
883
+ // Vue.extend constructor export interop
884
+ var options =
885
+ typeof scriptExports === 'function' ? scriptExports.options : scriptExports
886
+
887
+ // render functions
888
+ if (render) {
889
+ options.render = render
890
+ options.staticRenderFns = staticRenderFns
891
+ options._compiled = true
892
+ }
893
+
894
+ // functional template
895
+ if (functionalTemplate) {
896
+ options.functional = true
897
+ }
898
+
899
+ // scopedId
900
+ if (scopeId) {
901
+ options._scopeId = 'data-v-' + scopeId
902
+ }
903
+
904
+ var hook
905
+ if (moduleIdentifier) {
906
+ // server build
907
+ hook = function (context) {
908
+ // 2.3 injection
909
+ context =
910
+ context || // cached call
911
+ (this.$vnode && this.$vnode.ssrContext) || // stateful
912
+ (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
913
+ // 2.2 with runInNewContext: true
914
+ if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
915
+ context = __VUE_SSR_CONTEXT__
916
+ }
917
+ // inject component styles
918
+ if (injectStyles) {
919
+ injectStyles.call(this, context)
920
+ }
921
+ // register component module identifier for async chunk inferrence
922
+ if (context && context._registeredComponents) {
923
+ context._registeredComponents.add(moduleIdentifier)
924
+ }
925
+ }
926
+ // used by ssr in case component is cached and beforeCreate
927
+ // never gets called
928
+ options._ssrRegister = hook
929
+ } else if (injectStyles) {
930
+ hook = shadowMode
931
+ ? function () {
932
+ injectStyles.call(
933
+ this,
934
+ (options.functional ? this.parent : this).$root.$options.shadowRoot
935
+ )
936
+ }
937
+ : injectStyles
938
+ }
939
+
940
+ if (hook) {
941
+ if (options.functional) {
942
+ // for template-only hot-reload because in that case the render fn doesn't
943
+ // go through the normalizer
944
+ options._injectStyles = hook
945
+ // register for functional component in vue file
946
+ var originalRender = options.render
947
+ options.render = function renderWithStyleInjection(h, context) {
948
+ hook.call(context)
949
+ return originalRender(h, context)
950
+ }
951
+ } else {
952
+ // inject component registration as beforeCreate hook
953
+ var existing = options.beforeCreate
954
+ options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
955
+ }
956
+ }
957
+
958
+ return {
959
+ exports: scriptExports,
960
+ options: options
961
+ }
962
+ }
963
+
964
+ // CONCATENATED MODULE: ./src/Components/VAMap.vue
965
+
966
+
967
+
968
+
969
+
970
+
971
+ /* normalize component */
972
+
973
+ var component = normalizeComponent(
974
+ Components_VAMapvue_type_script_lang_js_,
975
+ render,
976
+ staticRenderFns,
977
+ false,
978
+ null,
979
+ "37c06024",
980
+ null
981
+
982
+ )
983
+
984
+ /* harmony default export */ var VAMap = (component.exports);
985
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"62109407-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/pug-plain-loader!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/Components/VAMapMarker.vue?vue&type=template&id=18484f00&scoped=true&lang=pug&
986
+ var VAMapMarkervue_type_template_id_18484f00_scoped_true_lang_pug_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"v-amap-marker"},[_vm._t("default")],2)
987
+ }
988
+ var VAMapMarkervue_type_template_id_18484f00_scoped_true_lang_pug_staticRenderFns = []
989
+
990
+
991
+ // CONCATENATED MODULE: ./src/Components/VAMapMarker.vue?vue&type=template&id=18484f00&scoped=true&lang=pug&
992
+
993
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/Components/VAMapMarker.vue?vue&type=script&lang=js&
994
+
995
+
996
+
997
+
998
+ const VAMapMarkervue_type_script_lang_js_watchedProps = [
999
+ 'position',
1000
+ 'anchor',
1001
+ 'offset',
1002
+ 'icon',
1003
+ 'draggable',
1004
+ 'cursor',
1005
+ [
1006
+ 'visible',
1007
+ function (marker, value) {
1008
+ marker[value ? 'show' : 'hide']()
1009
+ value && this._updateMarkerContent()
1010
+ }
1011
+ ],
1012
+ [
1013
+ 'zIndex',
1014
+ function (marker, value) {
1015
+ marker.setzIndex(value)
1016
+ }
1017
+ ],
1018
+ 'angle',
1019
+ 'animation',
1020
+ 'shadow',
1021
+ 'title',
1022
+ 'clickable',
1023
+ 'shape',
1024
+ 'extData',
1025
+ 'label'
1026
+ ]
1027
+
1028
+ /* harmony default export */ var VAMapMarkervue_type_script_lang_js_ = ({
1029
+ name: 'VAMapMarker',
1030
+ data() {
1031
+ return {
1032
+ marker: null,
1033
+ isFixedMarkerSize: false
1034
+ }
1035
+ },
1036
+ mounted() {
1037
+ this._createMarker()
1038
+ },
1039
+ async updated() {
1040
+ if (!this.marker) return
1041
+ if (this.isFixedMarkerSize) return
1042
+
1043
+ this.isFixedMarkerSize = true
1044
+
1045
+ await this.$nextTick()
1046
+
1047
+ this._updateMarkerContent()
1048
+ },
1049
+ destroyed() {
1050
+ this._removeMarker()
1051
+ },
1052
+ methods: {
1053
+ async _createMarker() {
1054
+ const AMap = await loader.load(),
1055
+ options = Object.assign({}, this.$attrs, {
1056
+ content: this.$scopedSlots.default ? this.$el : null
1057
+ })
1058
+
1059
+ this.marker = new AMap.Marker(options)
1060
+
1061
+ utils_listenerProxy(this.marker, this)
1062
+ utils_watchProps(this.marker, this, VAMapMarkervue_type_script_lang_js_watchedProps)
1063
+
1064
+ this._addMarker()
1065
+ },
1066
+ _updateMarkerContent() {
1067
+ this.marker.setContent(this.$el)
1068
+ },
1069
+ _addMarker() {
1070
+ if (!this.$parent.addMarker) return
1071
+
1072
+ this.$parent.addMarker(this.marker)
1073
+
1074
+ this.$emit('init', this.marker)
1075
+ },
1076
+ _removeMarker() {
1077
+ if (!this.marker) return
1078
+ if (!this.$parent.removeMarker) return
1079
+
1080
+ this.$parent.removeMarker(this.marker)
1081
+ }
1082
+ }
1083
+ });
1084
+
1085
+ // CONCATENATED MODULE: ./src/Components/VAMapMarker.vue?vue&type=script&lang=js&
1086
+ /* harmony default export */ var Components_VAMapMarkervue_type_script_lang_js_ = (VAMapMarkervue_type_script_lang_js_);
1087
+ // CONCATENATED MODULE: ./src/Components/VAMapMarker.vue
1088
+
1089
+
1090
+
1091
+
1092
+
1093
+ /* normalize component */
1094
+
1095
+ var VAMapMarker_component = normalizeComponent(
1096
+ Components_VAMapMarkervue_type_script_lang_js_,
1097
+ VAMapMarkervue_type_template_id_18484f00_scoped_true_lang_pug_render,
1098
+ VAMapMarkervue_type_template_id_18484f00_scoped_true_lang_pug_staticRenderFns,
1099
+ false,
1100
+ null,
1101
+ "18484f00",
1102
+ null
1103
+
1104
+ )
1105
+
1106
+ /* harmony default export */ var VAMapMarker = (VAMapMarker_component.exports);
1107
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/Components/VAMapMassMarks.vue?vue&type=script&lang=js&
1108
+
1109
+
1110
+
1111
+
1112
+ const VAMapMassMarksvue_type_script_lang_js_watchedProps = [
1113
+ // 新增属性
1114
+ [
1115
+ 'data',
1116
+ function (marker, value) {
1117
+ marker.setData(value)
1118
+ }
1119
+ ],
1120
+ [
1121
+ 'styleObject',
1122
+ (marker, value) => {
1123
+ marker.setStyle(value)
1124
+ }
1125
+ ],
1126
+ [
1127
+ 'visible',
1128
+ (marker, value) => {
1129
+ marker[value ? 'show' : 'hide']()
1130
+ }
1131
+ ]
1132
+ ]
1133
+
1134
+ /* harmony default export */ var VAMapMassMarksvue_type_script_lang_js_ = ({
1135
+ name: 'VAMapMassMarks',
1136
+ data() {
1137
+ return {
1138
+ marker: null
1139
+ }
1140
+ },
1141
+ created() {
1142
+ this._createMarker()
1143
+ },
1144
+ destroyed() {
1145
+ this._removeMarker()
1146
+ },
1147
+ methods: {
1148
+ async _createMarker() {
1149
+ const AMap = await loader.load(),
1150
+ options = Object.assign({}, this.$attrs, {
1151
+ style: this.$attrs.styleObject || {}
1152
+ })
1153
+
1154
+ this.marker = new AMap.MassMarks(this.$attrs.data || [], options)
1155
+
1156
+ utils_listenerProxy(this.marker, this)
1157
+ utils_watchProps(this.marker, this, VAMapMassMarksvue_type_script_lang_js_watchedProps)
1158
+
1159
+ this._addMarker()
1160
+ },
1161
+ _addMarker() {
1162
+ if (!this.$parent.aMap) return
1163
+
1164
+ this.marker.setMap(this.$parent.aMap)
1165
+
1166
+ this.$emit('init', this.marker)
1167
+ },
1168
+ _removeMarker() {
1169
+ if (!this.marker) return
1170
+
1171
+ this.marker.clear()
1172
+ this.marker.setMap()
1173
+ }
1174
+ },
1175
+ render() {
1176
+ return null
1177
+ }
1178
+ });
1179
+
1180
+ // CONCATENATED MODULE: ./src/Components/VAMapMassMarks.vue?vue&type=script&lang=js&
1181
+ /* harmony default export */ var Components_VAMapMassMarksvue_type_script_lang_js_ = (VAMapMassMarksvue_type_script_lang_js_);
1182
+ // CONCATENATED MODULE: ./src/Components/VAMapMassMarks.vue
1183
+ var VAMapMassMarks_render, VAMapMassMarks_staticRenderFns
1184
+
1185
+
1186
+
1187
+
1188
+ /* normalize component */
1189
+
1190
+ var VAMapMassMarks_component = normalizeComponent(
1191
+ Components_VAMapMassMarksvue_type_script_lang_js_,
1192
+ VAMapMassMarks_render,
1193
+ VAMapMassMarks_staticRenderFns,
1194
+ false,
1195
+ null,
1196
+ null,
1197
+ null
1198
+
1199
+ )
1200
+
1201
+ /* harmony default export */ var VAMapMassMarks = (VAMapMassMarks_component.exports);
1202
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/Components/VAMapPolygon.vue?vue&type=script&lang=js&
1203
+
1204
+
1205
+
1206
+
1207
+ const VAMapPolygonvue_type_script_lang_js_watchedProps = [
1208
+ 'path',
1209
+ // 新增属性
1210
+ [
1211
+ 'visible',
1212
+ function (marker, value) {
1213
+ marker[value ? 'show' : 'hide']()
1214
+ }
1215
+ ],
1216
+ [
1217
+ 'zIndex',
1218
+ function (marker, value) {
1219
+ marker.setOptions({ zIndex: value })
1220
+ }
1221
+ ],
1222
+ [
1223
+ 'bubble',
1224
+ function (marker, value) {
1225
+ marker.setOptions({ bubble: value })
1226
+ }
1227
+ ],
1228
+ [
1229
+ 'cursor',
1230
+ function (marker, value) {
1231
+ marker.setOptions({ cursor: value })
1232
+ }
1233
+ ],
1234
+ [
1235
+ 'strokeColor',
1236
+ function (marker, value) {
1237
+ marker.setOptions({ strokeColor: value })
1238
+ }
1239
+ ],
1240
+ [
1241
+ 'strokeOpacity',
1242
+ function (marker, value) {
1243
+ marker.setOptions({ strokeOpacity: value })
1244
+ }
1245
+ ],
1246
+ [
1247
+ 'strokeWeight',
1248
+ function (marker, value) {
1249
+ marker.setOptions({ strokeWeight: value })
1250
+ }
1251
+ ],
1252
+ [
1253
+ 'strokeStyle',
1254
+ function (marker, value) {
1255
+ marker.setOptions({ strokeStyle: value })
1256
+ }
1257
+ ],
1258
+ [
1259
+ 'strokeDasharray',
1260
+ function (marker, value) {
1261
+ marker.setOptions({ strokeDasharray: value })
1262
+ }
1263
+ ],
1264
+ [
1265
+ 'fillColor',
1266
+ function (marker, value) {
1267
+ marker.setOptions({ fillColor: value })
1268
+ }
1269
+ ],
1270
+ [
1271
+ 'fillOpacity',
1272
+ function (marker, value) {
1273
+ marker.setOptions({ fillOpacity: value })
1274
+ }
1275
+ ],
1276
+ [
1277
+ 'draggable',
1278
+ function (marker, value) {
1279
+ marker.setOptions({ draggable: value })
1280
+ }
1281
+ ]
1282
+ ]
1283
+
1284
+ /* harmony default export */ var VAMapPolygonvue_type_script_lang_js_ = ({
1285
+ name: 'VAMapPolygon',
1286
+ data() {
1287
+ return {
1288
+ marker: null
1289
+ }
1290
+ },
1291
+ created() {
1292
+ this._createMarker()
1293
+ },
1294
+ destroyed() {
1295
+ this._removeMarker()
1296
+ },
1297
+ methods: {
1298
+ async _createMarker() {
1299
+ const AMap = await loader.load(),
1300
+ options = Object.assign({}, this.$attrs, {
1301
+ map: undefined
1302
+ })
1303
+
1304
+ this.marker = new AMap.Polygon(options)
1305
+
1306
+ utils_listenerProxy(this.marker, this)
1307
+ utils_watchProps(this.marker, this, VAMapPolygonvue_type_script_lang_js_watchedProps)
1308
+
1309
+ this._addMarker()
1310
+ },
1311
+ _addMarker() {
1312
+ if (!this.$parent.addMarker) return
1313
+
1314
+ this.$parent.addMarker(this.marker)
1315
+
1316
+ this.$emit('init', this.marker)
1317
+ },
1318
+ _removeMarker() {
1319
+ if (!this.marker) return
1320
+ if (!this.$parent.removeMarker) return
1321
+
1322
+ this.$parent.removeMarker(this.marker)
1323
+ }
1324
+ },
1325
+ render() {
1326
+ return null
1327
+ }
1328
+ });
1329
+
1330
+ // CONCATENATED MODULE: ./src/Components/VAMapPolygon.vue?vue&type=script&lang=js&
1331
+ /* harmony default export */ var Components_VAMapPolygonvue_type_script_lang_js_ = (VAMapPolygonvue_type_script_lang_js_);
1332
+ // CONCATENATED MODULE: ./src/Components/VAMapPolygon.vue
1333
+ var VAMapPolygon_render, VAMapPolygon_staticRenderFns
1334
+
1335
+
1336
+
1337
+
1338
+ /* normalize component */
1339
+
1340
+ var VAMapPolygon_component = normalizeComponent(
1341
+ Components_VAMapPolygonvue_type_script_lang_js_,
1342
+ VAMapPolygon_render,
1343
+ VAMapPolygon_staticRenderFns,
1344
+ false,
1345
+ null,
1346
+ null,
1347
+ null
1348
+
1349
+ )
1350
+
1351
+ /* harmony default export */ var VAMapPolygon = (VAMapPolygon_component.exports);
1352
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"62109407-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/pug-plain-loader!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/Components/VAMapPlaceSearchInput.vue?vue&type=template&id=57fd4556&scoped=true&lang=pug&
1353
+ var VAMapPlaceSearchInputvue_type_template_id_57fd4556_scoped_true_lang_pug_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"v-amap-place-search-input"},[_c('input',{ref:"input",attrs:{"placeholder":_vm.placeholder}})])
1354
+ }
1355
+ var VAMapPlaceSearchInputvue_type_template_id_57fd4556_scoped_true_lang_pug_staticRenderFns = []
1356
+
1357
+
1358
+ // CONCATENATED MODULE: ./src/Components/VAMapPlaceSearchInput.vue?vue&type=template&id=57fd4556&scoped=true&lang=pug&
1359
+
1360
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/Components/VAMapPlaceSearchInput.vue?vue&type=script&lang=js&
1361
+
1362
+
1363
+
1364
+ /* harmony default export */ var VAMapPlaceSearchInputvue_type_script_lang_js_ = ({
1365
+ name: 'VAMapPlaceSearchInput',
1366
+ props: {
1367
+ placeholder: {
1368
+ type: String,
1369
+ default: ''
1370
+ },
1371
+ customEnable: {
1372
+ type: Boolean,
1373
+ default: true
1374
+ }
1375
+ },
1376
+ data() {
1377
+ return {
1378
+ AMap: null,
1379
+ autocompleteListener: null,
1380
+ placeSearchListener: null
1381
+ }
1382
+ },
1383
+ async mounted() {
1384
+ this.AMap = await loader.load()
1385
+ this.addListener()
1386
+ },
1387
+ destroyed() {
1388
+ this.removeListener()
1389
+ },
1390
+ methods: {
1391
+ async addListener() {
1392
+ const autocomplete = new this.AMap.Autocomplete({
1393
+ input: this.$refs.input
1394
+ }),
1395
+ placeSearch = new this.AMap.PlaceSearch({})
1396
+
1397
+ this.autocompleteListener = this.AMap.event.addListener(
1398
+ autocomplete,
1399
+ 'select',
1400
+ event => {
1401
+ placeSearch.search(event.poi.name)
1402
+ }
1403
+ )
1404
+
1405
+ this.placeSearchListener = this.AMap.event.addListener(
1406
+ placeSearch,
1407
+ 'complete',
1408
+ event => {
1409
+ var position = null
1410
+ if (
1411
+ event &&
1412
+ event.poiList &&
1413
+ event.poiList.pois &&
1414
+ event.poiList.pois.length
1415
+ ) {
1416
+ position = [
1417
+ event.poiList.pois[0].location.lng,
1418
+ event.poiList.pois[0].location.lat
1419
+ ]
1420
+ }
1421
+ this.$emit('change', position)
1422
+
1423
+ if (!position && !this.customEnable) {
1424
+ this.$refs.input.value = ''
1425
+ }
1426
+ }
1427
+ )
1428
+ },
1429
+ removeListener() {
1430
+ this.AMap.event.removeListener(this.autocompleteListener)
1431
+ this.AMap.event.removeListener(this.placeSearchListener)
1432
+ }
1433
+ }
1434
+ });
1435
+
1436
+ // CONCATENATED MODULE: ./src/Components/VAMapPlaceSearchInput.vue?vue&type=script&lang=js&
1437
+ /* harmony default export */ var Components_VAMapPlaceSearchInputvue_type_script_lang_js_ = (VAMapPlaceSearchInputvue_type_script_lang_js_);
1438
+ // EXTERNAL MODULE: ./src/Components/VAMapPlaceSearchInput.vue?vue&type=style&index=0&id=57fd4556&prod&lang=stylus&scoped=true&
1439
+ var VAMapPlaceSearchInputvue_type_style_index_0_id_57fd4556_prod_lang_stylus_scoped_true_ = __webpack_require__("61d4");
1440
+
1441
+ // EXTERNAL MODULE: ./src/Components/VAMapPlaceSearchInput.vue?vue&type=style&index=1&id=57fd4556&prod&lang=stylus&
1442
+ var VAMapPlaceSearchInputvue_type_style_index_1_id_57fd4556_prod_lang_stylus_ = __webpack_require__("fcc8");
1443
+
1444
+ // CONCATENATED MODULE: ./src/Components/VAMapPlaceSearchInput.vue
1445
+
1446
+
1447
+
1448
+
1449
+
1450
+
1451
+
1452
+ /* normalize component */
1453
+
1454
+ var VAMapPlaceSearchInput_component = normalizeComponent(
1455
+ Components_VAMapPlaceSearchInputvue_type_script_lang_js_,
1456
+ VAMapPlaceSearchInputvue_type_template_id_57fd4556_scoped_true_lang_pug_render,
1457
+ VAMapPlaceSearchInputvue_type_template_id_57fd4556_scoped_true_lang_pug_staticRenderFns,
1458
+ false,
1459
+ null,
1460
+ "57fd4556",
1461
+ null
1462
+
1463
+ )
1464
+
1465
+ /* harmony default export */ var VAMapPlaceSearchInput = (VAMapPlaceSearchInput_component.exports);
1466
+ // CONCATENATED MODULE: ./src/Components/index.js
1467
+
1468
+
1469
+
1470
+
1471
+
1472
+
1473
+ /* harmony default export */ var Components = ([
1474
+ VAMap,
1475
+ VAMapMarker,
1476
+ VAMapMassMarks,
1477
+ VAMapPolygon,
1478
+ VAMapPlaceSearchInput
1479
+ ]);
1480
+
1481
+ // CONCATENATED MODULE: ./src/index.js
1482
+
1483
+
1484
+
1485
+ let globalMapOptions = {}
1486
+
1487
+ class src_AMapManager {
1488
+ static get AMapLoader() {
1489
+ return loader
1490
+ }
1491
+ static get globalMapOptions() {
1492
+ return globalMapOptions
1493
+ }
1494
+ static install(Vue) {
1495
+ Components.forEach(Component => {
1496
+ Vue.component(Component.name, Component)
1497
+ })
1498
+ }
1499
+ static async initAMap({ globalMapOptions: options = {}, ...args }) {
1500
+ globalMapOptions = Object.assign({}, options)
1501
+
1502
+ loader.config({ ...args })
1503
+
1504
+ return await loader.load()
1505
+ }
1506
+ constructor() {}
1507
+ }
1508
+
1509
+
1510
+
1511
+ /* harmony default export */ var src_0 = (src_AMapManager);
1512
+
1513
+ // CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
1514
+
1515
+
1516
+ /* harmony default export */ var entry_lib = __webpack_exports__["default"] = (src_0);
1517
+
1518
+
1519
+
1520
+ /***/ }),
1521
+
1522
+ /***/ "fcc8":
1523
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1524
+
1525
+ "use strict";
1526
+ /* harmony import */ var _node_modules_vue_style_loader_index_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_3_node_modules_stylus_loader_index_js_ref_11_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_VAMapPlaceSearchInput_vue_vue_type_style_index_1_id_57fd4556_prod_lang_stylus___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("2cc0");
1527
+ /* harmony import */ var _node_modules_vue_style_loader_index_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_3_node_modules_stylus_loader_index_js_ref_11_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_VAMapPlaceSearchInput_vue_vue_type_style_index_1_id_57fd4556_prod_lang_stylus___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_vue_style_loader_index_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_3_node_modules_stylus_loader_index_js_ref_11_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_VAMapPlaceSearchInput_vue_vue_type_style_index_1_id_57fd4556_prod_lang_stylus___WEBPACK_IMPORTED_MODULE_0__);
1528
+ /* unused harmony reexport * */
1529
+
1530
+
1531
+ /***/ })
1532
+
1533
+ /******/ })["default"];
1534
+ });
1535
+ //# sourceMappingURL=vue-amap.umd.js.map