Skip to content
Snippets Groups Projects
Commit 28bc3f27 authored by 汤绍坚's avatar 汤绍坚
Browse files

tsj: CooglMap js修改search获取点位失败的问题:增加token;CooglMap地图首页才显示cqi;要显示地图底图

parent 3b5a5d7d
Branches
Tags
No related merge requests found
......@@ -30,7 +30,6 @@ import { useDashboard } from '../../context';
// import { CooglLoadArea } from './loadAreaNew';
// import { CooglLoadArea } from './loadArea-1.3.1';
import { CooglLoadArea } from './loadArea-1.4.0';
import AreaSelector from '../AreaSelector';
export const colorConfig: Record<
string,
......@@ -414,7 +413,8 @@ const DistrictMapCustomized: React.FC<DistrictMapCustomizedProps> = ({ onMapInst
try {
// 初始化CooglLoadArea
console.log('[CooglMapDemo] 开始初始化CooglLoadArea', MapRef.current);
let instance = new CooglLoadArea(viewer);
let token = '24e46ea5-73df-4c84-93b1-7513a2507f8f';
let instance = new CooglLoadArea(viewer, token);
// 设置实例参数
instance.params = {
......@@ -460,7 +460,7 @@ const DistrictMapCustomized: React.FC<DistrictMapCustomizedProps> = ({ onMapInst
zoom={8}
ref={MapRef}
center={{ x: 103.96, y: 30.658842 }}
showOriginMap={false}
// showOriginMap={false}
customInitCallback={(viewer: any) => initLoadCooglMapArea(viewer)}
changeSize={{ x1: 908, y1: 430, x2: 908, y2: 572 }}
>
......@@ -468,7 +468,7 @@ const DistrictMapCustomized: React.FC<DistrictMapCustomizedProps> = ({ onMapInst
<>
{/**区域 */}
{/* {memoizedPolygons} */}
{data?.map((item, index) => {
{isHomePage && data?.map((item, index) => {
const point = [Number(item.centerX), Number(item.centerY)];
return (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment