Browse Source

uamPosition 주석

master
hhjk00 11 months ago
parent
commit
9d358d7361
  1. 50
      src/components/map/naver/NaverMap.js

50
src/components/map/naver/NaverMap.js

@ -171,31 +171,31 @@ export const NaverCustomMap = () => {
}, []);
useEffect(() => {
uamPosition.map(uam => {
const name = uam.name;
const position = new naver.maps.LatLng(uam.lat, uam.lon);
const cont =
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">',
`<span style="color:#ffffff">${name}</span>`,
'</div>'
]
: [
'<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>`,
'</div>'
];
new naver.maps.Marker({
position: position,
map: mapObject,
icon: {
content: cont.join(''),
anchor: new naver.maps.Point(20, 20)
}
});
});
// uamPosition.map(uam => {
// const name = uam.name;
// const position = new naver.maps.LatLng(uam.lat, uam.lon);
// const cont =
// 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">',
// `<span style="color:#ffffff">${name}</span>`,
// '</div>'
// ]
// : [
// '<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>`,
// '</div>'
// ];
// new naver.maps.Marker({
// position: position,
// map: mapObject,
// icon: {
// content: cont.join(''),
// anchor: new naver.maps.Point(20, 20)
// }
// });
// });
// coordCenter = new nl();
coordCenter.map((val, idx) => {
const position = new naver.maps.LatLng(

Loading…
Cancel
Save