define([ 'html!templates/tools/toolPlaceSearch', 'modDir/service/addressSearch', 'modDir/service/poiSearch', 'modDir/service/routeSearch', 'text!data/address_baike/db.json', 'css!styles/tools/toolPlaceSearch' ], function(tpcLayout, addressSearchF, poiSearchF,routeSearchF,addressBaikeDb) { /** * 索引函数 */ if (!Array.prototype.indexOf) { Array.prototype.indexOf = function(elt, from) { var len = this.length; var from = Number(arguments[1]) || 0; from = (from < 0) ? Math.ceil(from) : Math.floor(from); if (from < 0) { from += len; } for (; from < len; from++) { if (from in this && this[from] === elt) { return from; } return -1; } } } /** * 模块数据 用于数据存储和外部调用 * @type {Object} * 数据存放 */ var modValue = { markers:{}, options: { page: 1, bounds: null, pageSize: 10, keyWord: '', type: 'bounds', // bounds/dis center: null, //中心点 dis: 0, //圆范围 themeId: null, //类型 pac: 0, //区域pac init_query_key: '' //原始查询关键字 }, initialized: false, //是否初始化 placeDataResult: null, //查询数据集合 fitBounds: true, //最优显示 circleGroup: null, //圆容器 searchCircle:null, searchPoup:null, markerGroup: null, //标记容器 hotPoint: [] //常用热点关键字 }; })