|
|
@ -171,31 +171,31 @@ export const NaverCustomMap = () => { |
|
|
|
}, []); |
|
|
|
}, []); |
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
useEffect(() => { |
|
|
|
uamPosition.map(uam => { |
|
|
|
// uamPosition.map(uam => {
|
|
|
|
const name = uam.name; |
|
|
|
// const name = uam.name;
|
|
|
|
const position = new naver.maps.LatLng(uam.lat, uam.lon); |
|
|
|
// const position = new naver.maps.LatLng(uam.lat, uam.lon);
|
|
|
|
const cont = |
|
|
|
// const cont =
|
|
|
|
name.substr(0, 1) == 'R' |
|
|
|
// name.substr(0, 1) == 'R'
|
|
|
|
? [ |
|
|
|
// ? [
|
|
|
|
'<div style="border-radius:50%; background:#429629; border: 4px solid #ffffff; padding:5px; width:40px; height:40px; text-align:center">', |
|
|
|
// '<div style="border-radius:50%; background:#429629; border: 4px solid #ffffff; padding:5px; width:40px; height:40px; text-align:center">',
|
|
|
|
`<span style="color:#ffffff">${name}</span>`, |
|
|
|
// `<span style="color:#ffffff">${name}</span>`,
|
|
|
|
'</div>' |
|
|
|
// '</div>'
|
|
|
|
] |
|
|
|
// ]
|
|
|
|
: [ |
|
|
|
// : [
|
|
|
|
'<div style="border-radius:50%; background:#ffffff; border: 4px solid #15298A; padding:5px; width:40px; height:40px; text-align:center ">', |
|
|
|
// '<div style="border-radius:50%; background:#ffffff; border: 4px solid #15298A; padding:5px; width:40px; height:40px; text-align:center ">',
|
|
|
|
`<span style="color:#000000">${name}</span>`, |
|
|
|
// `<span style="color:#000000">${name}</span>`,
|
|
|
|
'</div>' |
|
|
|
// '</div>'
|
|
|
|
]; |
|
|
|
// ];
|
|
|
|
|
|
|
|
|
|
|
|
new naver.maps.Marker({ |
|
|
|
// new naver.maps.Marker({
|
|
|
|
position: position, |
|
|
|
// position: position,
|
|
|
|
map: mapObject, |
|
|
|
// map: mapObject,
|
|
|
|
icon: { |
|
|
|
// icon: {
|
|
|
|
content: cont.join(''), |
|
|
|
// content: cont.join(''),
|
|
|
|
anchor: new naver.maps.Point(20, 20) |
|
|
|
// anchor: new naver.maps.Point(20, 20)
|
|
|
|
} |
|
|
|
// }
|
|
|
|
}); |
|
|
|
// });
|
|
|
|
}); |
|
|
|
// });
|
|
|
|
// coordCenter = new nl();
|
|
|
|
// coordCenter = new nl();
|
|
|
|
coordCenter.map((val, idx) => { |
|
|
|
coordCenter.map((val, idx) => { |
|
|
|
const position = new naver.maps.LatLng( |
|
|
|
const position = new naver.maps.LatLng( |
|
|
|