Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Showing "home" instead of Font Awesome icon. #5

Open
nomoregrapes opened this issue Dec 29, 2016 · 0 comments
Open

Showing "home" instead of Font Awesome icon. #5

nomoregrapes opened this issue Dec 29, 2016 · 0 comments

Comments

@nomoregrapes
Copy link

I've added this plugin to use Font Awesome (fa) icons, however the markers are showing "home" instead of my desired train.

Screenshot, showing the problem blue markers. Also visible is use of Font Awesome outside the map.
mapbox-icons

My javascript is a bit specific, but this is where it sets use of the glyph instead of a standard marker

		if(feature.properties.attraction = 'station') {
			theIconStyle = L.icon.glyph({
				prefix: 'fa',
				glyph: 'train',
				glyphColor: '#0D86BF'
			});
			return {"icon": L.icon.glyph(theIconStyle)};
		}

		return {"icon": L.mapbox.marker.icon(theIconStyle)};

With Chrome inspector, this is what one of the markers markup is like
<div class="leaflet-marker-icon leaflet-glyph-icon leaflet-zoom-animated leaflet-clickable" tabindex="0" style="background-image: url(&quot;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAUlSURBVFjDrZdLiBxVFIb/e289uqt6kkx6zIiIoKgLRReKuMhCcaOIAUEIiCCE4CIPggZ8kBjooPgM0TiYEUUjqBGchZqAQlyYRTA+kJiJQiJGMjN5zYzT3dP1rrr3HBeTjDGTSfc8Dvyruud89Z9z6kIJdBj31763MivsJXKuZYF6dak5++2mh7NOcsXVHq6sHbhOK/24kOJJMO4AE1vKygwZhxlKSHGKiD+RSu09vOXB43OCrHz96y6T2lsh+OmKXzFdlbLne2UopSAupBhjECcZgjDMgiiSxPhcK/nCr1sfOtcWcm/tq9uEsL4rl0vdK67pKVu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CeQhiiQgQbxjtlqzQk59vCZlNluL5lDiORLyMjcA4DsKeXM4AfDKxa97ThAAqPaMfaR1Nq6jOiqOAhOm5TsKJg1QZGGRedY7V6tzVcjBWk1D0JZ8cigt2RJSimkXnqOgW8MxQLUTb6wN5g0BgGPV0c9BekTH41xx5YXrQ8FkTRgdpxU7ea9djbYQ1GokmJ43wUhWtgRcS04tQjAcw9CWw29tThYOAXD03XVfMps/TTTOy30blDZgiqxFK6p7OsnvCDJ1UD9LyUjORoPDkUQyPfdHbXW+qJCjfRsOwOAoNY4z6Xz01rHq3k5zO4ZMHTabYSIhJD87MLB64f8Ys8WdG/tfBljMJedfwY+s/2P4Pv8AAAAASUVORK5CYII=&quot;); margin-left: -12px; margin-top: -41px; width: 25px; height: 41px; transform: translate3d(343px, 9px, 0px); z-index: 9;"><span class=" " style="font-size: 11px;color: white;width: 25px;line-height: 41px;text-align: center;margin-left: 0px;margin-top: -7px;pointer-events: none;display: inline-block;">home</span></div>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant