Swirl97 / BLM-USA-Protests

Shows locations of different Black Lives Matter Protests around America
https://swirl97.github.io/BLM-USA-Protests/
0 stars 0 forks source link

Project Feedback #5

Open kcroland opened 4 years ago

kcroland commented 4 years ago

Hey Sarah!

I really like the idea of your map! I was also having trouble with figuring out how to add points, but I was able to get it to work. So if you still need help, let me know and I would be happy to help! I wasn't entirely sure what points you wanted to map, but if it was just a few cities, then you may be able to use leaflet markers. Otherwise, you should be able to use L.geoJson.ajax('linkToGeojsonFile') inside one of your layers.

Another note, I agree with Professor Zhao that it may be interesting to use different basemaps. Possibly to link different stories?

Great work!

Swirl97 commented 4 years ago

Thanks for mentioning this! I actually have looked through my code again and I believe I do have that on my index.html line 194 - 197 but I am not sure what's wrong?

kcroland commented 4 years ago

I may be missing something, but it looks like those lines refer to the scenes rather than actual layers. Is the repo updated?

Swirl97 commented 4 years ago

I just updated my repo! :D

I did not make any changes to the previous code, and it still does not show markers but is able to display something still.

kcroland commented 4 years ago

Ah, I think I see what it is. It looks like no layers are added to the scenes on line 212. For example line 214 that has washington: {lat: 47.7510528, lng: -120.8101782, zoom: 7, name: 'Washington', layers: []} should have a layer in the layers property array.

Something like: washington: {lat: 47.7510528, lng: -120.8101782, zoom: 7, name: 'Washington', layers: [layers.markers]}

If you want the markers layer on all the maps, then you would put the layer on all the scenes. Let me know if that works!

Swirl97 commented 4 years ago

Kyle! IT DID IT! I SEE MARKERS!!! :sob:

Thank you so much! It's showing up on the live server and wow that made me super happy - thank you!!

kcroland commented 4 years ago

Woohoo! I know that feel when something finally works, I'm glad it does now! 😄

Swirl97 commented 4 years ago

Edit: JUST KIDDING! I was just being anxious and impatient! It shows up now!!! :D

Okay! I celebrated too early since it's not showing up on Github but it does show in live server but I think I can figure it out from there. I do appreciate your help and thank you for looking over the code!