Create maps using Leaflet in React JS (Tutorial)

  Рет қаралды 42,760

The Art Of Coding

The Art Of Coding

Күн бұрын

Пікірлер: 41
@cryptofelix5242
@cryptofelix5242 11 ай бұрын
Honestly very cool video for getting started with maps in web development and making them interactive. The music had me hooked as well! Thank you!
@MiroStoj12
@MiroStoj12 2 жыл бұрын
The entire code used for mapping the state outlines, which isn't able to include the multi polygon states, can be replaced by 1 import and line of code: Thankfully 'react-leaflet' can do a lot for us
@demetriusrobinson6000
@demetriusrobinson6000 2 жыл бұрын
Can you post this code?
@mikolaj7238
@mikolaj7238 10 ай бұрын
9:36 - 9:38 what did you press?
@theartofcoding3058
@theartofcoding3058 10 ай бұрын
This is "Format document" shortcut. It's depend on your setup. You can right click in the file and find your own shortcut
@danielbisceanu2861
@danielbisceanu2861 2 жыл бұрын
At the 8:25 step, after the copyright attribution has been written, my map doesn't display anything, it's still grey
@theartofcoding3058
@theartofcoding3058 2 жыл бұрын
Do you create your own key from maptiler, because I already disabled the key in video. If because of that, you can create your own key, it free
@ammaralfayyadh7720
@ammaralfayyadh7720 2 жыл бұрын
@@theartofcoding3058 how can I get the copyright attribution?
@theartofcoding3058
@theartofcoding3058 2 жыл бұрын
@@ammaralfayyadh7720 You can change it here
@Daniel-us8vk
@Daniel-us8vk 8 ай бұрын
Why are some us states not colored in? Michigan, washington state, dc, virginia, ? How do i fix? Thx
@theartofcoding3058
@theartofcoding3058 8 ай бұрын
Maybe I do not have data of that state in json file
@Daniel-us8vk
@Daniel-us8vk 8 ай бұрын
@@theartofcoding3058 thanks for the reply! The states were included in the data file i believe the issue was because they were “multipolygons” i ended up using geojson isntead of polygon and it worked. Your video was alot of help thank you!!
@yernar7.084
@yernar7.084 9 ай бұрын
Hello , good content, what about the click event? There is an idea when you click on region there will be pop-up(modal) with info about the region how to do it?((
@sairam9638
@sairam9638 2 жыл бұрын
is there is available geojson for other country
@GeekSP1
@GeekSP1 2 жыл бұрын
i was like 💃💃💃 the whole time. 😂😂😂
@HaxeHere
@HaxeHere 2 жыл бұрын
Hey, thanks for the tutorial! Some of the states are left borderless on the map. Have you found out any reason why this happens? I've tried different things but I can't find the solution.
@theartofcoding3058
@theartofcoding3058 2 жыл бұрын
I think maybe we do not have data border for that state so some of it left borderless.
@HaxeHere
@HaxeHere 2 жыл бұрын
@@theartofcoding3058 I actually found a solution (kinda). Only the states that have the data type 'polygon' work, the data needs to be modified manually from multipolygon to polygon if you want this code to work perfectly (it would be a huge amount of work, especially for the states of Alaska and Texas). I managed to split Finland into it's counties perfectly with this tutorial and free data online, so thanks again!
@arghavan9325
@arghavan9325 2 жыл бұрын
Super cool, thanks! Can we get the name or other info from the states when we click on each one of them (in the end)?
@theartofcoding3058
@theartofcoding3058 2 жыл бұрын
Sure, we can. everything in the JSON object can get and displayed as you want.
@arghavan9325
@arghavan9325 2 жыл бұрын
@@theartofcoding3058 thanks! How can (or from where) I get such a JSON file? I have no clue 😅
@theartofcoding3058
@theartofcoding3058 2 жыл бұрын
@@arghavan9325 of, in JSON file we already have field name of state: item.properties.name
@axoltl2261
@axoltl2261 Жыл бұрын
PS C:\xampp\htdocs\System> npm install react react-dom leaflet npm : The term 'npm' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + npm install react react-dom leaflet + ~~~ + CategoryInfo : ObjectNotFound: (npm:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException I tried to follow the tutorial but this is the error I encountered.
@theartofcoding3058
@theartofcoding3058 Жыл бұрын
npm is node package manager, you need to install it before do anything else
@Addy__
@Addy__ 2 жыл бұрын
Great tutorial! Where can I find GeoJson files for other countries?
@theartofcoding3058
@theartofcoding3058 2 жыл бұрын
you can query from google maps API or bing maps API for other country
@longlifelearner654
@longlifelearner654 Жыл бұрын
Are those Google maps or bing maps API free?
@victoriduh3130
@victoriduh3130 2 жыл бұрын
My map does not display, still shows gray
@theartofcoding3058
@theartofcoding3058 2 жыл бұрын
Do you mean your map show gray color in 7:00. If it's that, you should create your own Maptiler, cloud.maptiler.com/maps/, because I already disable the key I use in this video.
@victoriduh3130
@victoriduh3130 2 жыл бұрын
@@theartofcoding3058 thanks, I already figured it.
@block4671
@block4671 3 жыл бұрын
how you convert json o js object just change extention of json
@theartofcoding3058
@theartofcoding3058 3 жыл бұрын
Oh, Visual Studio Code have extension for format js file. So I just need add const variable = before json object and press format button, extensions will change json object to js object for me.
@rizkiwijaya6327
@rizkiwijaya6327 Жыл бұрын
@@theartofcoding3058 Hi same problem from me. May I know the extension for this? Thank you for the great video
@ghosting7550
@ghosting7550 2 жыл бұрын
the tutor is bboy ?_? that song make me want to battle
@iambao1940
@iambao1940 3 жыл бұрын
Hay qua anh oi
@theartofcoding3058
@theartofcoding3058 3 жыл бұрын
Thank you =))
@chovycon3056
@chovycon3056 2 жыл бұрын
Hello ae Việt Nam
@theartofcoding3058
@theartofcoding3058 2 жыл бұрын
Hello my brothers =))
@RoadSafety1
@RoadSafety1 3 жыл бұрын
A WA number or email it is not available in your profile, How could I contact you?
@theartofcoding3058
@theartofcoding3058 3 жыл бұрын
Oh, sorry, my bad, you can contact with me via Gmail: hqdung99@gmail.com
@RoadSafety1
@RoadSafety1 2 жыл бұрын
@@theartofcoding3058 Please check your email. Daniel
Chain Game Strong ⛓️
00:21
Anwar Jibawi
Рет қаралды 41 МЛН
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 700 М.
React JS Explained In 10 Minutes
10:00
Dennis Ivy
Рет қаралды 372 М.
World map in #React Js using Jvectormap #worldmap
13:48
Code Mastry
Рет қаралды 8 М.
Mapbox - Interactive maps in React
23:32
Leigh Halliday
Рет қаралды 163 М.
Modern Data Fetching in React (Complete Guide)
16:41
Cosden Solutions
Рет қаралды 82 М.
How I integrated OpenLayers in React Native
8:33
PhanxDEV
Рет қаралды 4,4 М.
React-Leaflet demo
19:58
LogRocket
Рет қаралды 54 М.
Every React Concept Explained in 12 Minutes
11:53
Code Bootcamp
Рет қаралды 942 М.
Microservices are Technical Debt
31:59
NeetCodeIO
Рет қаралды 759 М.