This commit is contained in:
zk
2024-09-23 16:43:57 +08:00
parent ca4a9a8c28
commit 278e91c262
26 changed files with 376 additions and 45 deletions
+6 -2
View File
@@ -1,4 +1,4 @@
import { mapIcon1, mapIcon2, mapIcon3, mapIcon4 } from '/@/components/chinaMap/chinaHooks.ts';
import { mapIcon1, mapIcon2, mapIcon3, mapIcon4, mapIcon7 } from '/@/components/chinaMap/chinaHooks.ts';
import { watchIcon } from '/@/components/secondaryScreen/secondMap/secondMapHooks.ts';
import * as turf from '@turf/turf';
@@ -20,7 +20,7 @@ export function createIcon({ icon, iconSize, imageSize }) {
* @desc 根据类型创建Icon
* @type 1:油田医院,2:合作医院,3:医疗点
*/
export function typeToIcon(type: string) {
export function typeToIcon(type: string, centerResource: boolean) {
const iconSize = [18, 44];
const imageSize = [18, 44];
if (type == '1') {
@@ -29,6 +29,10 @@ export function typeToIcon(type: string) {
if (type == '2') {
return createIcon({ icon: mapIcon4, iconSize, imageSize });
}
//关联医疗点
if (type == '3' && centerResource) {
return createIcon({ icon: mapIcon7, iconSize, imageSize });
}
if (type == '3') {
return createIcon({ icon: mapIcon2, iconSize, imageSize });
}