Use gradient for user-location hack circle

This commit is contained in:
fkloft 2013-12-11 19:26:07 +01:00
parent fe0c408fd5
commit 5c30743531
2 changed files with 11 additions and 2 deletions

View File

@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">
<radialGradient id="user-location-gradient">
<stop style="stop-color: #ffa500; stop-opacity: 0; " offset="0.875" />
<stop style="stop-color: #ffa500; stop-opacity: 1; " offset="1" />
</radialGradient>
</svg>

After

Width:  |  Height:  |  Size: 294 B

View File

@ -25,6 +25,8 @@ window.plugin.userLocation.locationLayer = new L.LayerGroup();
window.plugin.userLocation.setup = function() {
$('<style>').prop('type', 'text/css').html('@@INCLUDESTRING:mobile/plugins/user-location.css@@').appendTo('head');
$('<div style="position:absolute; left:-9999em; top:-9999em;">').html('@@INCLUDESTRING:mobile/plugins/user-location.svg@@').prependTo('body');
var cssClass = PLAYER.team === 'RESISTANCE' ? 'res' : 'enl';
var icon = L.divIcon({
@ -41,9 +43,10 @@ window.plugin.userLocation.setup = function() {
});
var circle = new L.Circle(new L.LatLng(0,0), 40, {
color: 'orange',
stroke: false,
opacity: 0.7,
fillOpacity: 0,
fillOpacity: 1,
fillColor: "url(#user-location-gradient)",
weight: 1.5,
clickable: false
});