Skip to content

Commit

Permalink
colocando awesome markers
Browse files Browse the repository at this point in the history
  • Loading branch information
joelxr committed Jul 29, 2016
1 parent e952a50 commit 39d66a0
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 4 deletions.
3 changes: 2 additions & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"font-abel": "^1.0.0",
"jquery": "2.1.4",
"mapbox.js": "^2.4.0",
"leaflet.markercluster": "^0.5.0"
"leaflet.markercluster": "^0.5.0",
"Leaflet.awesome-markers": "leaflet.awesome-markers#^2.0.2"
},
"devDependencies": {
"jquery": "2.1.4"
Expand Down
7 changes: 6 additions & 1 deletion mapa/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
---
<div class="video-container">
<div id='map' style="position:absolute; top:0; bottom:0; width:100%;"></div>
<a href='#' id='geolocate'>PERTO DE MIM</a>
<a href='#' id='geolocate'>MINHA LOCALIZAÇÃO</a>
<script>

L.mapbox.accessToken = 'pk.eyJ1Ijoiam9lbHhyIiwiYSI6ImNpcTI3b3l5MzAxM3ZmaW5uMDBnMjYxd2IifQ.8HAKtUOggFVWSy1OlDvx2Q';
Expand Down Expand Up @@ -64,6 +64,11 @@
]
};

var redMarker = L.AwesomeMarkers.icon({
icon: 'coffee',
markerColor: 'red'
});

var geojson = L.geoJson(json, {
onEachFeature: function (feature, layer) {
layer.setIcon(L.icon(feature.properties.icon));
Expand Down
27 changes: 25 additions & 2 deletions tasks/copy.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,23 @@ module.exports = function(grunt){
dest: 'assets/css/leaflet.markercluster.css',
filter: 'isFile'
},
{
{
src: 'assets/vendor/leaflet.markercluster/dist/MarkerCluster.Default.css',
dest: 'assets/css/leaflet.markercluster.default.css',
filter: 'isFile'
},
{
src: 'assets/vendor/leaflet.awesome-markers/dist/leaflet.awesome-markers.css',
dest: 'assets/css/leaflet.awesome-markers.css',
filter: 'isFile'
},
{
expand: true,
cwd: 'assets/vendor/Leaflet.awesome-markers/dist/images/',
src: '**',
dest: 'assets/css/images/',
filter: 'isFile'
},
]
},
dev: {
Expand Down Expand Up @@ -132,7 +144,18 @@ module.exports = function(grunt){
dest: '_site/assets/css/leaflet.markercluster.default.css',
filter: 'isFile'
},

{
src: 'assets/vendor/leaflet.awesome-markers/dist/leaflet.awesome-markers.css',
dest: '_site/assets/css/leaflet.awesome-markers.css',
filter: 'isFile'
},
{
expand: true,
cwd: 'assets/vendor/Leaflet.awesome-markers/dist/images/',
src: '**',
dest: '_site/assets/css/images/',
filter: 'isFile'
},
]
}
});
Expand Down
2 changes: 2 additions & 0 deletions tasks/uglify.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module.exports = function(grunt){
'assets/js/mapbox.js' : 'assets/vendor/mapbox.js/mapbox.js',
'assets/js/leaflet.js' : 'assets/vendor/leaflet/dist/leaflet-src.js',
'assets/js/leaflet.markercluster.js' : 'assets/vendor/leaflet.markercluster/dist/leaflet.markercluster-src.js',
'assets/js/leaflet.awesome-markers.js' : 'assets/vendor/Leaflet.awesome-markers/dist/leaflet.awesome-markers.js',
}
},
dev: {
Expand All @@ -16,6 +17,7 @@ module.exports = function(grunt){
'_site/assets/js/mapbox.js' : 'assets/vendor/mapbox.js/mapbox.js',
'_site/assets/js/leaflet.js' : 'assets/vendor/leaflet/dist/leaflet.js',
'_site/assets/js/leaflet.markercluster.js' : 'assets/vendor/leaflet.markercluster/dist/leatlet.markercluster.js',
'_site/assets/js/leaflet.awesome-markers.js' : 'assets/vendor/Leaflet.awesome-markers/dist/leaflet.awesome-markers.js',
}
}
});
Expand Down

0 comments on commit 39d66a0

Please sign in to comment.