Leaflet.label
HTML
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7/leaflet.css">
<script src="http://cdn.leafletjs.com/leaflet-0.7/leaflet.js"></script>
<script src="http://leaflet.github.io/Leaflet.label/leaflet.label-src.js"></script>
<link rel="stylesheet" href="http://leaflet.github.io/Leaflet.label/leaflet.label.css">
<script src="https://raw.githubusercontent.com/glenrobertson/leaflet-tilelayer-geojson/master/TileLayer.GeoJSON.js"></script>
<div id="map"></div>
CSS
#map {
height: 640px;
}
JavaScript
map = L.map('map');
map.addLayer(new L.TileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'));
point = L.latLng(8, 8);
map.setView(point, 12);
var style = {
// "clickable": true,
"color": "#0354A5",
"fillColor": "#0354A5",
"weight": 0.5,
"opacity": 0.5,
"fillOpacity": 0.3
};
var hoverStyle = {
"fillOpacity": 0.5
};
var geojsonURL = 'http://polymaps.appspot.com/state/{z}/{x}/{y}.json';
var geojsonTileLayer = new L.TileLayer.GeoJSON(geojsonURL, {
clipTiles: false,
unique: function (feature) {
return feature.id;
}
}, {
style: style,
}
);
geojsonTileLayer.setZIndex(-1)
map.addLayer(geojsonTileLayer, true);