This repository has been archived by the owner on Sep 20, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(build): Added a new service leafletMarkerHelpers with the method…
…s needed to manage the marker attribute
- Loading branch information
1 parent
afa17e5
commit f0dadaf
Showing
7 changed files
with
74 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
angular.module("leaflet-directive").factory('leafletMarkerHelpers', function () { | ||
|
||
var LeafletDefaultIcon = L.Icon.extend({ | ||
options: { | ||
iconUrl: 'http://cdn.leafletjs.com/leaflet-0.7/images/marker-icon.png', | ||
iconRetinaUrl: 'http://cdn.leafletjs.com/leaflet-0.7/images/marker-icon-2x.png', | ||
iconSize: [25, 41], | ||
iconAnchor: [12, 40], | ||
labelAnchor: [10, -20], | ||
popupAnchor: [0, -40], | ||
shadow: { | ||
url: 'http://cdn.leafletjs.com/leaflet-0.7/images/marker-shadow.png', | ||
retinaUrl: 'http://cdn.leafletjs.com/leaflet-0.7/images/marker-shadow.png', | ||
size: [41, 41], | ||
anchor: [12, 40] | ||
} | ||
} | ||
}); | ||
|
||
return { | ||
getLeafletIcon: function(data) { | ||
return new LeafletDefaultIcon(data); | ||
} | ||
}; | ||
|
||
}); |