jakobzhao / geog458

Advanced Digital Geographies @ UW-Seattle
GNU Lesser General Public License v3.0
251 stars 58 forks source link

Missing ICONS #15

Closed parthw98 closed 3 years ago

parthw98 commented 4 years ago
Screen Shot 2020-05-02 at 12 53 22 PM

After finishing the code all my icons have disappeared. Can someone please tell me where I went wrong?

parthw98 commented 4 years ago
Screen Shot 2020-05-02 at 1 04 21 PM

This is my resulting live server.

jakobzhao commented 4 years ago

open inspector to track where the bugs are.

parthw98 commented 4 years ago

I can hardly understand the codes written in the inspector. Is there another way to track bugs?

parthw98 commented 4 years ago

https://github.com/parthw98/airportsinus/blob/master/index.html

Here is my code

lolakang commented 4 years ago
      pointToLayer: function (feature, latlng) {
        var id = 0;
        if (feature.properties.CNTL_TWR == "Y") { id = 0; }
        else { id = 1; }
        return L.marker(latlng, {icon: L.divIcon({className: 'fa fa-plane marker-color-' + (id + 1).toString() })});

This part should be your code for the icons. Sometimes, I just simply change the "fa" to "fas" or always go with some old version code of the icons since it always works for me.