ng-cw-v12
Version:
Angular UI component library
969 lines • 60.4 kB
JavaScript
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('rxjs'), require('rxjs/operators'), require('@angular/common/http')) :
typeof define === 'function' && define.amd ? define('ng-cw-v12/poi', ['exports', '@angular/core', '@angular/common', '@angular/forms', 'rxjs', 'rxjs/operators', '@angular/common/http'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["ng-cw-v12"] = global["ng-cw-v12"] || {}, global["ng-cw-v12"].poi = {}), global.ng.core, global.ng.common, global.ng.forms, global.rxjs, global.rxjs.operators, global.ng.common.http));
})(this, (function (exports, i0, i3, i4, rxjs, operators, i1) { 'use strict';
function _interopNamespace(e) {
if (e && e.__esModule) return e;
var n = Object.create(null);
if (e) {
Object.keys(e).forEach(function (k) {
if (k !== 'default') {
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: function () { return e[k]; }
});
}
});
}
n["default"] = e;
return Object.freeze(n);
}
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
/******************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
/* global Reflect, Promise */
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b)
if (Object.prototype.hasOwnProperty.call(b, p))
d[p] = b[p]; };
return extendStatics(d, b);
};
function __extends(d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
var __assign = function () {
__assign = Object.assign || function __assign(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s)
if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
function __rest(s, e) {
var t = {};
for (var p in s)
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
}
function __decorate(decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
r = Reflect.decorate(decorators, target, key, desc);
else
for (var i = decorators.length - 1; i >= 0; i--)
if (d = decorators[i])
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
}
function __param(paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); };
}
function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
function accept(f) { if (f !== void 0 && typeof f !== "function")
throw new TypeError("Function expected"); return f; }
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
var _, done = false;
for (var i = decorators.length - 1; i >= 0; i--) {
var context = {};
for (var p in contextIn)
context[p] = p === "access" ? {} : contextIn[p];
for (var p in contextIn.access)
context.access[p] = contextIn.access[p];
context.addInitializer = function (f) { if (done)
throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
if (kind === "accessor") {
if (result === void 0)
continue;
if (result === null || typeof result !== "object")
throw new TypeError("Object expected");
if (_ = accept(result.get))
descriptor.get = _;
if (_ = accept(result.set))
descriptor.set = _;
if (_ = accept(result.init))
initializers.push(_);
}
else if (_ = accept(result)) {
if (kind === "field")
initializers.push(_);
else
descriptor[key] = _;
}
}
if (target)
Object.defineProperty(target, contextIn.name, descriptor);
done = true;
}
;
function __runInitializers(thisArg, initializers, value) {
var useValue = arguments.length > 2;
for (var i = 0; i < initializers.length; i++) {
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
}
return useValue ? value : void 0;
}
;
function __propKey(x) {
return typeof x === "symbol" ? x : "".concat(x);
}
;
function __setFunctionName(f, name, prefix) {
if (typeof name === "symbol")
name = name.description ? "[".concat(name.description, "]") : "";
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
}
;
function __metadata(metadataKey, metadataValue) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
return Reflect.metadata(metadataKey, metadataValue);
}
function __awaiter(thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try {
step(generator.next(value));
}
catch (e) {
reject(e);
} }
function rejected(value) { try {
step(generator["throw"](value));
}
catch (e) {
reject(e);
} }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
}
function __generator(thisArg, body) {
var _ = { label: 0, sent: function () { if (t[0] & 1)
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f)
throw new TypeError("Generator is already executing.");
while (g && (g = 0, op[0] && (_ = 0)), _)
try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
return t;
if (y = 0, t)
op = [op[0] & 2, t.value];
switch (op[0]) {
case 0:
case 1:
t = op;
break;
case 4:
_.label++;
return { value: op[1], done: false };
case 5:
_.label++;
y = op[1];
op = [0];
continue;
case 7:
op = _.ops.pop();
_.trys.pop();
continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
_ = 0;
continue;
}
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
_.label = op[1];
break;
}
if (op[0] === 6 && _.label < t[1]) {
_.label = t[1];
t = op;
break;
}
if (t && _.label < t[2]) {
_.label = t[2];
_.ops.push(op);
break;
}
if (t[2])
_.ops.pop();
_.trys.pop();
continue;
}
op = body.call(thisArg, _);
}
catch (e) {
op = [6, e];
y = 0;
}
finally {
f = t = 0;
}
if (op[0] & 5)
throw op[1];
return { value: op[0] ? op[1] : void 0, done: true };
}
}
var __createBinding = Object.create ? (function (o, m, k, k2) {
if (k2 === undefined)
k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function () { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function (o, m, k, k2) {
if (k2 === undefined)
k2 = k;
o[k2] = m[k];
});
function __exportStar(m, o) {
for (var p in m)
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
__createBinding(o, m, p);
}
function __values(o) {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m)
return m.call(o);
if (o && typeof o.length === "number")
return {
next: function () {
if (o && i >= o.length)
o = void 0;
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
}
function __read(o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m)
return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
ar.push(r.value);
}
catch (error) {
e = { error: error };
}
finally {
try {
if (r && !r.done && (m = i["return"]))
m.call(i);
}
finally {
if (e)
throw e.error;
}
}
return ar;
}
/** @deprecated */
function __spread() {
for (var ar = [], i = 0; i < arguments.length; i++)
ar = ar.concat(__read(arguments[i]));
return ar;
}
/** @deprecated */
function __spreadArrays() {
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
}
function __spreadArray(to, from, pack) {
if (pack || arguments.length === 2)
for (var i = 0, l = from.length, ar; i < l; i++) {
if (ar || !(i in from)) {
if (!ar)
ar = Array.prototype.slice.call(from, 0, i);
ar[i] = from[i];
}
}
return to.concat(ar || Array.prototype.slice.call(from));
}
function __await(v) {
return this instanceof __await ? (this.v = v, this) : new __await(v);
}
function __asyncGenerator(thisArg, _arguments, generator) {
if (!Symbol.asyncIterator)
throw new TypeError("Symbol.asyncIterator is not defined.");
var g = generator.apply(thisArg, _arguments || []), i, q = [];
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
function verb(n) { if (g[n])
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
function resume(n, v) { try {
step(g[n](v));
}
catch (e) {
settle(q[0][3], e);
} }
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
function fulfill(value) { resume("next", value); }
function reject(value) { resume("throw", value); }
function settle(f, v) { if (f(v), q.shift(), q.length)
resume(q[0][0], q[0][1]); }
}
function __asyncDelegator(o) {
var i, p;
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
}
function __asyncValues(o) {
if (!Symbol.asyncIterator)
throw new TypeError("Symbol.asyncIterator is not defined.");
var m = o[Symbol.asyncIterator], i;
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
}
function __makeTemplateObject(cooked, raw) {
if (Object.defineProperty) {
Object.defineProperty(cooked, "raw", { value: raw });
}
else {
cooked.raw = raw;
}
return cooked;
}
;
var __setModuleDefault = Object.create ? (function (o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function (o, v) {
o["default"] = v;
};
function __importStar(mod) {
if (mod && mod.__esModule)
return mod;
var result = {};
if (mod != null)
for (var k in mod)
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
__createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
}
function __importDefault(mod) {
return (mod && mod.__esModule) ? mod : { default: mod };
}
function __classPrivateFieldGet(receiver, state, kind, f) {
if (kind === "a" && !f)
throw new TypeError("Private accessor was defined without a getter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
throw new TypeError("Cannot read private member from an object whose class did not declare it");
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
}
function __classPrivateFieldSet(receiver, state, value, kind, f) {
if (kind === "m")
throw new TypeError("Private method is not writable");
if (kind === "a" && !f)
throw new TypeError("Private accessor was defined without a setter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
throw new TypeError("Cannot write private member to an object whose class did not declare it");
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
}
function __classPrivateFieldIn(state, receiver) {
if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function"))
throw new TypeError("Cannot use 'in' operator on non-object");
return typeof state === "function" ? receiver === state : state.has(receiver);
}
var LocalService = /** @class */ (function () {
function LocalService() {
this.x_PI = 3.14159265358979324 * 3000.0 / 180.0;
this.PI = 3.1415926535897932384626;
this.a = 6378245.0;
this.ee = 0.00669342162296594323;
}
/**
* 百度坐标系 (BD-09) 与火星坐标系 (GCJ-02) 的转换
* 即百度 转 谷歌、高德
* @param lng 经度
* @param lat 纬度
* @returns [lng, lat]
*/
LocalService.prototype.bd09togcj02 = function (lng, lat) {
var x_pi = 3.14159265358979324 * 3000.0 / 180.0;
var x = lng - 0.0065;
var y = lat - 0.006;
var z = Math.sqrt(x * x + y * y) - 0.00002 * Math.sin(y * x_pi);
var theta = Math.atan2(y, x) - 0.000003 * Math.cos(x * x_pi);
var gg_lng = z * Math.cos(theta);
var gg_lat = z * Math.sin(theta);
return [gg_lng, gg_lat];
};
/**
* 火星坐标系 (GCJ-02) 与百度坐标系 (BD-09) 的转换
* 即谷歌、高德 转 百度
* @param lng 经度
* @param lat 纬度
* @returns [lng, lat]
*/
LocalService.prototype.gcj02tobd09 = function (lng, lat) {
var z = Math.sqrt(lng * lng + lat * lat) + 0.00002 * Math.sin(lat * this.x_PI);
var theta = Math.atan2(lat, lng) + 0.000003 * Math.cos(lng * this.x_PI);
var bd_lng = z * Math.cos(theta) + 0.0065;
var bd_lat = z * Math.sin(theta) + 0.006;
return [bd_lng, bd_lat];
};
/**
* WGS84转火星坐标系 (GCJ-02)
* 即WGS84 转 谷歌、高德
* @param lng 经度
* @param lat 纬度
* @returns [lng, lat]
*/
LocalService.prototype.wgs84togcj02 = function (lng, lat) {
if (this.out_of_china(lng, lat)) {
return [lng, lat];
}
else {
var dlat = this.transformlat(lng - 105.0, lat - 35.0);
var dlng = this.transformlng(lng - 105.0, lat - 35.0);
var radlat = lat / 180.0 * this.PI;
var magic = Math.sin(radlat);
magic = 1 - this.ee * magic * magic;
var sqrtmagic = Math.sqrt(magic);
dlat = (dlat * 180.0) / ((this.a * (1 - this.ee)) / (magic * sqrtmagic) * this.PI);
dlng = (dlng * 180.0) / (this.a / sqrtmagic * Math.cos(radlat) * this.PI);
var mglat = lat + dlat;
var mglng = lng + dlng;
return [mglng, mglat];
}
};
/**
* 火星坐标系 (GCJ-02)转WGS84
* 即谷歌、高德 转 WGS84
* @param lng 经度
* @param lat 纬度
* @returns [lng, lat]
*/
LocalService.prototype.gcj02towgs84 = function (lng, lat) {
if (this.out_of_china(lng, lat)) {
return [lng, lat];
}
else {
var dlat = this.transformlat(lng - 105.0, lat - 35.0);
var dlng = this.transformlng(lng - 105.0, lat - 35.0);
var radlat = lat / 180.0 * this.PI;
var magic = Math.sin(radlat);
magic = 1 - this.ee * magic * magic;
var sqrtmagic = Math.sqrt(magic);
dlat = (dlat * 180.0) / ((this.a * (1 - this.ee)) / (magic * sqrtmagic) * this.PI);
dlng = (dlng * 180.0) / (this.a / sqrtmagic * Math.cos(radlat) * this.PI);
var mglat = lat + dlat;
var mglng = lng + dlng;
return [lng * 2 - mglng, lat * 2 - mglat];
}
};
LocalService.prototype.transformlat = function (lng, lat) {
var ret = -100.0 + 2.0 * lng + 3.0 * lat + 0.2 * lat * lat + 0.1 * lng * lat + 0.2 * Math.sqrt(Math.abs(lng));
ret += (20.0 * Math.sin(6.0 * lng * this.PI) + 20.0 * Math.sin(2.0 * lng * this.PI)) * 2.0 / 3.0;
ret += (20.0 * Math.sin(lat * this.PI) + 40.0 * Math.sin(lat / 3.0 * this.PI)) * 2.0 / 3.0;
ret += (160.0 * Math.sin(lat / 12.0 * this.PI) + 320 * Math.sin(lat * this.PI / 30.0)) * 2.0 / 3.0;
return ret;
};
LocalService.prototype.transformlng = function (lng, lat) {
var ret = 300.0 + lng + 2.0 * lat + 0.1 * lng * lng + 0.1 * lng * lat + 0.1 * Math.sqrt(Math.abs(lng));
ret += (20.0 * Math.sin(6.0 * lng * this.PI) + 20.0 * Math.sin(2.0 * lng * this.PI)) * 2.0 / 3.0;
ret += (20.0 * Math.sin(lng * this.PI) + 40.0 * Math.sin(lng / 3.0 * this.PI)) * 2.0 / 3.0;
ret += (150.0 * Math.sin(lng / 12.0 * this.PI) + 300.0 * Math.sin(lng / 30.0 * this.PI)) * 2.0 / 3.0;
return ret;
};
/**
* 判断是否在国内,不在国内则不做偏移
*/
LocalService.prototype.out_of_china = function (lng, lat) {
return (lng < 72.004 || lng > 137.8347) || ((lat < 0.8293 || lat > 55.8271) || false);
};
/**
* jsonp封装
* @param obj \{url: '', success: ()=> {}}
*/
LocalService.prototype.jsonpFunction = function (obj) {
// 创建一个script标签;
var script = document.createElement("script");
// 给函数起名字,定义为全局函数;
var fnName = "jsonp" + new Date().getTime();
// window.aaa就是把aaa设置为全局变量!
window[fnName] = obj.success;
// 改变src,添加到head中
if (obj.url.includes('?')) {
script.src = obj.url + "&callback=" + fnName;
}
else {
script.src = obj.url + "?callback=" + fnName;
}
// 把script标签添加到head标签中,就会发送src的请求了
document.head.appendChild(script);
// 代码执行完毕,把script标签删除
script.onload = function () {
document.head.removeChild(script);
window[fnName] = undefined;
};
};
return LocalService;
}());
LocalService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: LocalService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
LocalService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: LocalService, providedIn: 'root' });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: LocalService, decorators: [{
type: i0.Injectable,
args: [{
providedIn: 'root'
}]
}], ctorParameters: function () { return []; } });
var PoiComponent = /** @class */ (function () {
function PoiComponent(eleRef, http, ls) {
this.eleRef = eleRef;
this.http = http;
this.ls = ls;
this.ncClick = new i0.EventEmitter();
this.ncClear = new i0.EventEmitter();
this.ncToken = '';
this.ncCity = '';
//百度:https://mapopen-website-wiki.cdn.bcebos.com/static_zip/BaiduMap_cityCode_1102.zip
//高德:https://a.amap.com/lbs/static/code_resource/AMap_adcode_citycode.zip
//天地图:https://download.tianditu.gov.cn/download/xzqh/AdminCode.csv
//腾讯:https://lbs.qq.com/service/webService/webServiceGuide/search/webServiceDistrict#6
this.ncPlaceholder = '搜地点';
this.ncWidth = '300px';
this.ncShowType = 'simple';
this.ncDelay = 500;
this.parametersOk = true; //参数是否输入完整,不完整不显示组件dom
this.searchBarShow = false; //poi搜索条显示
this.poiKey = ''; //poi搜索关键字
this.poiInputing = false;
this.poiTipsList = []; //poi搜索提示结果
this.poiTipsListShow = false; //是否显示poi提示列表
this.$poiKeyChangeSubject = new rxjs.Subject();
}
PoiComponent.prototype.ngOnInit = function () {
var _this = this;
if (!this.ncMapType) {
this.parametersOk = false;
console.error('ncMapType为空');
}
if (this.ncToken == '') {
this.parametersOk = false;
console.error('ncToken为空,请根据地图类型传入相应token');
}
//监听搜索输入框值变化,500ms没变才执行搜索
this.$poiKeyChangeSubject.pipe(operators.debounceTime(this.ncDelay), operators.distinctUntilChanged(function (n, o) {
return n === o;
})).subscribe(function (_value) {
if (_value) {
_this.searchPoiTips();
}
else {
_this.clearPoi();
}
});
};
//win11微软输入法输入中文时会触发mouseleave
//-----解决思路如下----:
//1、通过document.activeElement.id判断input有焦点时searchBarLeave不执行searchBarShow=false
//2、但是input焦点一直存在,searchBarLeave永远不执行searchBarShow=false
//3、接着增加searchInputLeave,在鼠标离开input时取消input焦点,解决上步
//4、但是现在输入中文时,输入第一个字母又会触发searchInputLeave,关闭了焦点,执行了搜索(输入zai时变成了z爱)
//5、接着增加poiInputing,keydown时poiInputing=true,第一个字母输入时不执行searchInputLeave里的取消焦点,解决上步,
//6、但是poiInputing就一直为true了,searchInputLeave永远不执行取消input焦点了
//7、接着增加on-keyup时poiInputing=false,解决上步
PoiComponent.prototype.searchBarLeave = function () {
var _this = this;
setTimeout(function () {
if (document.activeElement && document.activeElement.id != 'searchInput') {
_this.searchBarShow = false;
}
});
};
PoiComponent.prototype.searchInputLeave = function () {
var _this = this;
if (this.poiInputing) {
return;
}
setTimeout(function () {
var searchInput = _this.eleRef.nativeElement.querySelector('#searchInput');
if (searchInput) {
searchInput.blur();
}
});
};
PoiComponent.prototype.showSearch = function () {
var _this = this;
this.searchBarShow = true;
setTimeout(function () {
var searchInput = _this.eleRef.nativeElement.querySelector('#searchInput');
if (searchInput) {
searchInput.focus();
}
});
};
//输入框值变化
PoiComponent.prototype.poiKeyChange = function () {
this.$poiKeyChangeSubject.next(this.poiKey);
};
//poi搜索提示
PoiComponent.prototype.searchPoiTips = function () {
return __awaiter(this, void 0, void 0, function () {
var url, url, url, url;
var _this = this;
return __generator(this, function (_a) {
if (this.ncMapType == 'gaode') {
url = "https://restapi.amap.com/v3/assistant/inputtips?key=" + this.ncToken + "&keywords=" + this.poiKey + "&city=" + this.ncCity;
this.http.get(url).subscribe(function (res) {
var e_1, _a;
_this.poiTipsListShow = true;
if (res['status'] == 1) {
_this.poiTipsList = res['tips'];
try {
for (var _b = __values(_this.poiTipsList), _c = _b.next(); !_c.done; _c = _b.next()) {
var l = _c.value;
if (l.location.length > 0) {
var GCJ02 = l.location.split(',');
l['locationWGS84'] = _this.ls.gcj02towgs84(Number(GCJ02[0]), Number(GCJ02[1]));
}
else {
l['locationWGS84'] = [];
}
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally { if (e_1) throw e_1.error; }
}
}
else {
_this.poiTipsList = [];
}
});
}
else if (this.ncMapType == 'baidu') {
url = '';
if (this.ncCity == '') {
url = "https://api.map.baidu.com/place/v2/suggestion?query=" + this.poiKey + "®ion=\u5168\u56FD&output=json&ak=" + this.ncToken;
}
else {
url = "https://api.map.baidu.com/place/v2/suggestion?query=" + this.poiKey + "®ion=" + this.ncCity + "&output=json&ak=" + this.ncToken;
}
this.ls.jsonpFunction({
url: url,
success: function (res) {
var e_2, _a;
_this.poiTipsListShow = true;
if (res['status'] == 0) {
_this.poiTipsList = res['result'];
try {
for (var _b = __values(_this.poiTipsList), _c = _b.next(); !_c.done; _c = _b.next()) {
var l = _c.value;
if (l.location.lat) {
var GCJ02 = _this.ls.bd09togcj02(Number(l.location.lng), Number(l.location.lat));
l['locationWGS84'] = _this.ls.gcj02towgs84(Number(GCJ02[0]), Number(GCJ02[1]));
}
else {
l['locationWGS84'] = [];
}
}
}
catch (e_2_1) { e_2 = { error: e_2_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally { if (e_2) throw e_2.error; }
}
}
else {
_this.poiTipsList = [];
}
}
});
}
else if (this.ncMapType == 'tianditu') {
url = '';
if (this.ncCity == '') {
url = "http://api.tianditu.gov.cn/v2/search?postStr={\"keyWord\":\"" + this.poiKey + "\",\"level\": 18,\"mapBound\": \"-180,-90,180,90\",\"queryType\":7,\"start\":0,\"count\":10,\"show\":2}&type=query&tk=" + this.ncToken;
}
else {
url = "http://api.tianditu.gov.cn/v2/search?postStr={\"keyWord\":\"" + this.poiKey + "\",\"specify\": " + this.ncCity + ",\"level\": 18,\"mapBound\": \"-180,-90,180,90\",\"queryType\":7,\"start\":0,\"count\":10,\"show\":2}&type=query&tk=" + this.ncToken;
}
this.http.get(url).subscribe(function (res) {
var e_3, _a;
_this.poiTipsListShow = true;
if (res['status'].infocode == 1000) {
_this.poiTipsList = res['pois'] || [];
try {
for (var _b = __values(_this.poiTipsList), _c = _b.next(); !_c.done; _c = _b.next()) {
var l = _c.value;
if (l.lonlat.length > 0) {
var temp = l.lonlat.split(',');
l['locationWGS84'] = [Number(temp[0]), Number(temp[1])];
}
else {
l['locationWGS84'] = [];
}
}
}
catch (e_3_1) { e_3 = { error: e_3_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally { if (e_3) throw e_3.error; }
}
}
else {
_this.poiTipsList = [];
}
});
}
else if (this.ncMapType == 'tencent') {
url = "https://apis.map.qq.com/ws/place/v1/suggestion?region=" + this.ncCity + "&keyword=" + this.poiKey + "&key=" + this.ncToken + "&output=jsonp";
this.ls.jsonpFunction({
url: url,
success: function (res) {
var e_4, _a;
_this.poiTipsListShow = true;
if (res['status'] == 0) {
_this.poiTipsList = res['data'];
try {
for (var _b = __values(_this.poiTipsList), _c = _b.next(); !_c.done; _c = _b.next()) {
var l = _c.value;
if (l.location.lat) {
l['locationWGS84'] = _this.ls.gcj02towgs84(Number(l.location.lng), Number(l.location.lat));
}
else {
l['locationWGS84'] = [];
}
}
}
catch (e_4_1) { e_4 = { error: e_4_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally { if (e_4) throw e_4.error; }
}
}
else {
_this.poiTipsList = [];
}
}
});
}
return [2 /*return*/];
});
});
};
//poi提示点击
//若提示列表经纬度则直接使用
//若没有则使用提示名字调用详细接口,取返回结果第一条的经纬度
PoiComponent.prototype.poiTipsClick = function (item) {
var _this = this;
this.searchBarShow = false;
if (item.locationWGS84.length > 0) {
this.ncClick.emit(item);
}
else {
if (this.ncMapType == 'gaode') {
var url = "https://restapi.amap.com/v3/place/text?key=" + this.ncToken + "&keywords=" + item.name + "&city=" + this.ncCity;
this.http.get(url).subscribe(function (res) {
if (res['status'] == 1) {
if (res['pois'][0].location.length > 0) {
var GCJ02 = res['pois'][0].location.split(',');
item['locationWGS84'] = _this.ls.gcj02towgs84(Number(GCJ02[0]), Number(GCJ02[1]));
_this.ncClick.emit(item);
}
else {
_this.ncClick.emit(item);
}
}
else {
_this.ncClick.emit(item);
}
});
}
else if (this.ncMapType == 'baidu') {
var url = '';
if (this.ncCity == '') {
url = "https://api.map.baidu.com/place/v2/search?query=" + item.name + "®ion=\u5168\u56FD&output=json&ak=" + this.ncToken;
}
else {
url = "https://api.map.baidu.com/place/v2/search?query=" + item.name + "®ion=" + this.ncCity + "&output=json&ak=" + this.ncToken;
}
this.ls.jsonpFunction({
url: url,
success: function (res) {
if (res['status'] == 0) {
if (res['results'][0].location.lat) {
var GCJ02 = _this.ls.bd09togcj02(Number(res['results'][0].location.lng), Number(res['results'][0].location.lat));
item['locationWGS84'] = _this.ls.gcj02towgs84(Number(GCJ02[0]), Number(GCJ02[1]));
_this.ncClick.emit(item);
}
else {
_this.ncClick.emit(item);
}
}
else {
_this.ncClick.emit(item);
}
}
});
}
else if (this.ncMapType == 'tianditu') {
this.ncClick.emit(item);
}
else if (this.ncMapType == 'tencent') {
var boundary = '';
if (this.ncCity == '') {
boundary = 'region(全国, 1)';
}
else {
boundary = "region(" + this.ncCity + ", 1)";
}
var url = "https://apis.map.qq.com/ws/place/v1/search?boundary=" + boundary + "&keyword=" + item.title + "&key=" + this.ncToken + "&output=jsonp";
this.ls.jsonpFunction({
url: url,
success: function (res) {
if (res['status'] == 0) {
if (res['data'][0].location.lat) {
item['locationWGS84'] = _this.ls.gcj02towgs84(Number(res['data'][0].location.lng), Number(res['data'][0].location.lat));
_this.ncClick.emit(item);
}
else {
_this.ncClick.emit(item);
}
}
else {
_this.ncClick.emit(item);
}
}
});
}
}
};
//清除poi
PoiComponent.prototype.clearPoi = function () {
this.poiKey = '';
this.poiTipsList = [];
this.poiTipsListShow = false;
this.ncClear.emit();
};
return PoiComponent;
}());
PoiComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: PoiComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i1__namespace.HttpClient }, { token: LocalService }], target: i0__namespace.ɵɵFactoryTarget.Component });
PoiComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.1.5", type: PoiComponent, selector: "nc-poi", inputs: { ncMapType: "ncMapType", ncToken: "ncToken", ncCity: "ncCity", ncPlaceholder: "ncPlaceholder", ncWidth: "ncWidth", ncShowType: "ncShowType", ncDelay: "ncDelay" }, outputs: { ncClick: "ncClick", ncClear: "ncClear" }, ngImport: i0__namespace, template: "<ng-container *ngIf=\"parametersOk\">\r\n <div class=\"searchIcon\" *ngIf=\"!searchBarShow\">\r\n <span on-mouseenter=\"showSearch()\">\r\n <svg t=\"1725550918948\" class=\"icon\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"\r\n p-id=\"23934\" width=\"32\" height=\"32\">\r\n <path\r\n d=\"M405.2 746.9C217 746.9 63.9 593.8 63.9 405.6S217 64.2 405.2 64.2s341.3 153.1 341.3 341.3-153.1 341.4-341.3 341.4z m0-614.4c-150.6 0-273.1 122.5-273.1 273.1s122.5 273.1 273.1 273.1 273.1-122.5 273.1-273.1-122.5-273.1-273.1-273.1z\"\r\n p-id=\"23935\"></path>\r\n <path\r\n d=\"M911.3 959.2L576.2 624.1c-0.8-0.8-0.8-2.1 0-2.8l45.4-45.4c0.8-0.8 2.1-0.8 2.8 0L959.5 911c0.8 0.8 0.8 2.1 0 2.8l-45.4 45.4c-0.8 0.8-2 0.8-2.8 0z\"\r\n p-id=\"23936\"></path>\r\n </svg>\r\n </span>\r\n </div>\r\n <div class=\"searchBar\" *ngIf=\"searchBarShow\" on-mouseleave=\"searchBarLeave()\" [ngStyle]=\"{'width': ncWidth}\">\r\n <input class=\"nc-input\" id=\"searchInput\" autocomplete=\"off\" type=\"text\" placeholder=\"{{ncPlaceholder}}\"\r\n [(ngModel)]=\"poiKey\" (ngModelChange)=\"poiKeyChange()\" on-mouseleave=\"searchInputLeave()\"\r\n on-keydown=\"poiInputing = true\" on-keyup=\"poiInputing = false\" />\r\n <div class=\"search-list\" *ngIf=\"poiTipsListShow\">\r\n <div class=\"no-data\" *ngIf=\"poiTipsList.length == 0\">\r\n <svg t=\"1725549253174\" class=\"icon\" viewBox=\"0 0 1024 1024\" version=\"1.1\"\r\n xmlns=\"http://www.w3.org/2000/svg\" p-id=\"14899\" width=\"64\" height=\"64\">\r\n <path\r\n d=\"M843.776 577.536L737.28 403.456c-2.048-4.096-6.144-6.144-10.24-6.144H284.672c-4.096 0-8.192 2.048-10.24 6.144l-106.496 174.08v215.04c0 6.144 4.096 10.24 10.24 10.24h657.408c6.144 0 10.24-4.096 10.24-10.24V581.632c-2.048 0-2.048-2.048-2.048-4.096z m-552.96-157.696h430.08l96.256 151.552H579.584c-6.144 0-10.24 4.096-10.24 10.24 0 34.816-28.672 63.488-63.488 63.488-34.816 0-63.488-28.672-63.488-63.488 0-6.144-4.096-10.24-10.24-10.24H194.56l96.256-151.552z m532.48 364.544h-634.88V593.92h233.472c6.144 40.96 40.96 75.776 83.968 75.776 43.008 0 79.872-32.768 83.968-75.776h233.472v190.464zM116.736 684.032v-12.288c0-2.048-2.048-6.144-6.144-6.144-2.048 0-6.144 2.048-6.144 6.144v12.288h-10.24c-2.048 0-6.144 2.048-6.144 6.144s2.048 6.144 6.144 6.144h12.288v12.288c0 2.048 2.048 6.144 6.144 6.144 2.048 0 6.144-2.048 6.144-6.144V696.32h12.288c2.048 0 6.144-2.048 6.144-6.144s-2.048-6.144-6.144-6.144h-14.336zM884.736 450.56h18.432c4.096 0 8.192 4.096 8.192 8.192s-4.096 8.192-8.192 8.192h-18.432v18.432c0 4.096-4.096 8.192-8.192 8.192s-8.192-4.096-8.192-8.192v-18.432h-18.432c-4.096 0-8.192-4.096-8.192-8.192s4.096-8.192 8.192-8.192h18.432v-18.432c0-4.096 4.096-8.192 8.192-8.192s8.192 4.096 8.192 8.192v18.432z m63.488 75.776h10.24c2.048 0 6.144 2.048 6.144 6.144s-2.048 6.144-6.144 6.144h-10.24v10.24c0 2.048-2.048 6.144-6.144 6.144-2.048 0-6.144-2.048-6.144-4.096v-10.24h-10.24c-2.048 0-6.144-2.048-6.144-6.144s2.048-6.144 6.144-6.144h10.24v-12.288c0-2.048 2.048-6.144 6.144-6.144 2.048 0 6.144 2.048 6.144 6.144v10.24zM131.072 436.224v-18.432c0-4.096-4.096-8.192-8.192-8.192s-8.192 4.096-8.192 8.192v16.384h-18.432c-4.096 0-8.192 4.096-8.192 8.192s4.096 8.192 8.192 8.192h16.384v20.48c0 4.096 4.096 8.192 8.192 8.192s8.192-4.096 8.192-8.192v-16.384h16.384c4.096 0 8.192-4.096 8.192-8.192s-4.096-8.192-8.192-8.192c4.096-2.048-14.336-2.048-14.336-2.048z m-77.824 174.08c-18.432 0-34.816-16.384-34.816-34.816 0-18.432 16.384-34.816 34.816-34.816 18.432 0 34.816 16.384 34.816 34.816 0 20.48-16.384 34.816-34.816 34.816z m0-16.384c10.24 0 16.384-8.192 16.384-16.384 0-10.24-8.192-16.384-16.384-16.384-10.24 0-16.384 8.192-16.384 16.384-2.048 8.192 6.144 16.384 16.384 16.384z m933.888-98.304c-8.192 0-16.384-6.144-16.384-16.384 0-8.192 6.144-16.384 16.384-16.384 8.192 0 16.384 6.144 16.384 16.384s-6.144 16.384-16.384 16.384z m0-6.144c4.096 0 8.192-4.096 8.192-8.192s-4.096-8.192-8.192-8.192-8.192 4.096-8.192 8.192 4.096 8.192 8.192 8.192zM288.768 241.664c6.144-6.144 14.336-6.144 20.48 0l51.2 51.2c6.144 6.144 6.144 14.336 0 20.48-6.144 6.144-14.336 6.144-20.48 0l-51.2-51.2c-6.144-6.144-6.144-14.336 0-20.48z m217.088-34.816c8.192 0 14.336 6.144 14.336 14.336v71.68c0 8.192-6.144 14.336-14.336 14.336-8.192 0-14.336-6.144-14.336-14.336v-71.68c0-6.144 6.144-14.336 14.336-14.336z m215.04 32.768c6.144 6.144 6.144 14.336 0 20.48L671.744 307.2c-6.144 6.144-14.336 6.144-20.48 0-6.144-6.144-6.144-14.336 0-20.48l49.152-49.152c6.144-4.096 16.384-4.096 20.48 2.048z m0 0\"\r\n p-id=\"14900\" fill=\"#bfbfbf\"></path>\r\n </svg>\r\n <div>\u6682\u65E0\u6570\u636E</div>\r\n </div>\r\n <ng-container *ngIf=\"poiTipsList.length > 0\">\r\n <!--\u7B80\u6613\u6A21\u5F0F-->\r\n <ng-container *ngIf=\"ncShowType == 'simple'\">\r\n <div class=\"list-row-1\" *ngFor=\"let l of poiTipsList;let i = index;\" (click)=\"poiTipsClick(l)\">\r\n <span class=\"tipsIcon\">\r\n <svg t=\"1725550918948\" class=\"icon\" viewBox=\"0 0 1024 1024\" version=\"1.1\"\r\n xmlns=\"http://www.w3.org/2000/svg\" p-id=\"23934\" width=\"32\" height=\"32\">\r\n <path\r\n d=\"M405.2 746.9C217 746.9 63.9 593.8 63.9 405.6S217 64.2 405.2 64.2s341.3 153.1 341.3 341.3-153.1 341.4-341.3 341.4z m0-614.4c-150.6 0-273.1 122.5-273.1 273.1s122.5 273.1 273.1 273.1 273.1-122.5 273.1-273.1-122.5-273.1-273.1-273.1z\"\r\n p-id=\"23935\"></path>\r\n <path\r\n d=\"M911.3 959.2L576.2 624.1c-0.8-0.8-0.8-2.1 0-2.8l45.4-45.4c0.8-0.8 2.1-0.8 2.8 0L959.5 911c0.8 0.8 0.8 2.1 0 2.8l-45.4 45.4c-0.8 0.8-2 0.8-2.8 0z\"\r\n p-id=\"23936\"></path>\r\n </svg>\r\n </span>\r\n <span>\r\n <ng-container *ngIf=\"ncMapType == 'gaode'\">{{l.name}}</ng-container>\r\n <ng-container *ngIf=\"ncMapType == 'baidu'\">{{l.name}}</ng-container>\r\n <ng-container *ngIf=\"ncMapType == 'tianditu'\">{{l.name}}</ng-container>\r\n <ng-container *ngIf=\"ncMapType == 'tencent'\">{{l.title}}</ng-container>\r\n </span>\r\n <span class=\"tipsDistrict\">\r\n <ng-container *ngIf=\"ncMapType == 'gaode'\">{{l.district}}</ng-container>\r\n <ng-container *ngIf=\"ncMapType == 'baidu'\">{{l.district}}</ng-container>\r\n <ng-container *ngIf=\"ncMapType == 'tianditu'\">{{l.county}}</ng-container>\r\n <ng-container *ngIf=\"ncMapType == 'tencent'\">{{l.district}}</ng-container>\r\n </span>\r\n </div>\r\n </ng-container>\r\n <!--\u8BE6\u7EC6\u6A21\u5F0F-->\r\n <ng-container *ngIf=\"ncShowType == 'detailed'\">\r\n <div class=\"list-row-2\" *ngFor=\"let l of poiTipsList;let i = index;\" (click)=\"poiTipsClick(l)\">\r\n <div class=\"name\">\r\n <ng-container *ngIf=\"ncMapType == 'gaode'\">{{i + 1}}\u3001{{l.name}}</ng-container>\r\n <ng-container *ngIf=\"ncMapType == 'baidu'\">{{i + 1}}\u3001{{l.name}}</ng-container>\r\n <ng-container *ngIf=\"ncMapType == 'tianditu'\">{{i + 1}}\u3001{{l.name}}</ng-container>\r\n <ng-container *ngIf=\"ncMapType == 'tencent'\">{{i + 1}}\u3001{{l.title}}</ng-container>\r\n </div>\r\n <div class=\"region\">\r\n <ng-container *ngIf=\"ncMapType == 'gaode'\">{{l.district}}</ng-container>\r\n <ng-container\r\n *ngIf=\"ncMapType == 'baidu'\">{{l.province}}{{l.city}}{{l.district}}</ng-container>\r\n <ng-container\r\n *ngIf=\"ncMapType == 'tianditu'\">{{l.province}}{{l.city}}{{l.county}}</ng-container>\r\n <ng-container\r\n *ngIf=\"ncMapType == 'tencent'\">{{l.province}}{{l.city}}{{l.district}}</ng-container>\r\n </div>\r\n <div class=\"address\">{{l.address}}</div>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </div>\r\n</ng-container>", styles: [".searchIcon{z-index:1001;position:relative;background-color:#1890ff;color:#fff;width:30px;height:30px;display:flex;align-items:center;justify-content:center;font-size:18px;border-radius:3px}.searchIcon svg{width:18px;height:18px;fill:#fff;display:flex}.searchBar{z-index:1001;position:relative}.searchBar .search-list{position:absolute;background-color:#fff;width:100%;max-height:380px;overflow:auto;box-shadow:0 2px 8px #e7e7e7}.searchBar .search-list .no-data{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:30px 0;color:gray}.searchBar .search-list .list-row-1{padding:5px 10px;cursor:pointer}.searchBar .search-list .list-row-1:hover{background-color:#ececec}.searchBar .search-list .list-row-1 .tipsIcon{color:gray;margin-right:5px}.searchBar .search-list .list-row-1 .tipsIcon svg{width:14px;height:14px;fill:gray;position:relative;top:2px}.searchBar .search-list .list-row-1 .tipsDistrict{color:gray;margin-left:5px;font-size:13px}.searchBar .search-list .list-row-2{padding:5px 10px;cursor:pointer}.searchBar .search-list .list-row-2:hover{background-color:#ececec}.searchBar .search-list .list-row-2 .region,.searchBar .search-list .list-row-2 .address{color:gray;font-size:13px}.searchBar .search-list::-webkit-scrollbar{width:5px!important;height:5px!important}.searchBar .search-list::-webkit-scrollbar-thumb{border-radius:5px!important;background:#cccccc!important}.searchBar .search-list::-webkit-scrollbar-track{border-radius:0!important;background:#f1f1f1!important}\n"], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i4__namespace.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i4__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: PoiComponent, decorators: [{
type: i0.Component,
args: [{
selector: 'nc-poi',
templateUrl: './poi.component.html',
styleUrls: ['./poi.component.less']
}]
}], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: i1__namespace.HttpClient }, { type: LocalService }]; }, propDecorators: { ncClick: [{
type: i0.Output
}], ncClear: [{
type: i0.Output
}], ncMapType: [{
type: i0.Input
}], ncToken: [{
type: i0.Input
}], ncCity: [{
type: i0.Input
}], ncPlaceholder: [{
type: i0.Input
}], ncWidth: [{
type: i0.Input
}], ncShowType: [{
type: i0.Input
}], ncDelay: [{
type: i0.Input
}] } });
var NcPoiModule = /** @class */ (function () {
function NcPoiModule() {
}
return NcPoiModule;
}());
NcPoiModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: NcPoiModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
NcPoiModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: NcPoiModule, declarations: [PoiComponent], imports: [i3.CommonModule,
i4.FormsModule], exports: [PoiComponent] });
NcPoiModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: NcPoiModule, imports: [[
i3.CommonModule,
i4.FormsModule
]] });
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.5", ngImport: i0__namespace, type: NcPoiModule, decorators: [{
type: i0.NgModule,
args: [{
declarations: [
PoiComponent
],
imports: [
i3.CommonModule,
i4.FormsModule
],
exports: [
PoiComponent
]
}]
}] });
/**
* Generated bundle index. Do not edit.
*/
exports.NcPoiModule = NcPoiModule;
exports.PoiComponent = PoiComponent;
Object.defineProperty(exports, '__esModule', { value: true });
}));
//# sourceMappingURL=ng-cw-v12-poi.umd.js.map