Use gradient for user-location hack circle
This commit is contained in:
parent
fe0c408fd5
commit
5c30743531
6
mobile/plugins/user-location.svg
Normal file
6
mobile/plugins/user-location.svg
Normal 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 |
@ -25,6 +25,8 @@ window.plugin.userLocation.locationLayer = new L.LayerGroup();
|
|||||||
window.plugin.userLocation.setup = function() {
|
window.plugin.userLocation.setup = function() {
|
||||||
$('<style>').prop('type', 'text/css').html('@@INCLUDESTRING:mobile/plugins/user-location.css@@').appendTo('head');
|
$('<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 cssClass = PLAYER.team === 'RESISTANCE' ? 'res' : 'enl';
|
||||||
|
|
||||||
var icon = L.divIcon({
|
var icon = L.divIcon({
|
||||||
@ -41,9 +43,10 @@ window.plugin.userLocation.setup = function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
var circle = new L.Circle(new L.LatLng(0,0), 40, {
|
var circle = new L.Circle(new L.LatLng(0,0), 40, {
|
||||||
color: 'orange',
|
stroke: false,
|
||||||
opacity: 0.7,
|
opacity: 0.7,
|
||||||
fillOpacity: 0,
|
fillOpacity: 1,
|
||||||
|
fillColor: "url(#user-location-gradient)",
|
||||||
weight: 1.5,
|
weight: 1.5,
|
||||||
clickable: false
|
clickable: false
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user