d3 map and weather
Budget: $10 β $30 USD
Hi,
I am trying to add weather to my app, so installed a weather package. I wanted to show date and weather in x axis.
I created subscription key. I followed the exact steps.
When I click California I need to zoom in to that state and marker to it. When I click Texas, I need to zoom in to the particular state. Similarly I need to add tooltip on top of the circles on the map showing the cases.
Providing my code snippet and sandbox below.
React package https://github.com/farahat80/react-open-weather#readme
https://codesandbox.io/s/n6ssk7?file=/src/App.js
In my d3 map I tried to add tool tip by referring the below link,
In the below Example they have provided in js but when I tried to implement in react itβs not working fine.
Can you tell me how to fix it, providing my code snippet and sandbox below
Example: https://medium.com/@anilnairxyz/tooltips-in-d3-svgs-249d3b6650bd
https://codesandbox.io/s/friendly-germain-bpliqe?file=/src/components/Map.js
.style(
"left",
event.pageX - document.getElementById("root").offsetLeft + 20 + "px"
)
.style(
"top",
event.pageY - document.getElementById("root").offsetTop - 60 + "px"
);
I am trying to add weather to my app, so installed a weather package. I wanted to show date and weather in x axis.
I created subscription key. I followed the exact steps.
When I click California I need to zoom in to that state and marker to it. When I click Texas, I need to zoom in to the particular state. Similarly I need to add tooltip on top of the circles on the map showing the cases.
Providing my code snippet and sandbox below.
React package https://github.com/farahat80/react-open-weather#readme
https://codesandbox.io/s/n6ssk7?file=/src/App.js
In my d3 map I tried to add tool tip by referring the below link,
In the below Example they have provided in js but when I tried to implement in react itβs not working fine.
Can you tell me how to fix it, providing my code snippet and sandbox below
Example: https://medium.com/@anilnairxyz/tooltips-in-d3-svgs-249d3b6650bd
https://codesandbox.io/s/friendly-germain-bpliqe?file=/src/components/Map.js
.style(
"left",
event.pageX - document.getElementById("root").offsetLeft + 20 + "px"
)
.style(
"top",
event.pageY - document.getElementById("root").offsetTop - 60 + "px"
);