Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A white square is showing under the symbol #29

Open
vincedchart opened this issue Jun 23, 2022 · 3 comments
Open

A white square is showing under the symbol #29

vincedchart opened this issue Jun 23, 2022 · 3 comments

Comments

@vincedchart
Copy link

How to remove it?

using * leaflet.motion - v0.3.2 (https://github.com/Igor-Vladyka/leaflet.motion#readme)

var dataCoords = [];

function doMotion() {
  var seqGroup = L.motion.seq([
    L.motion.polyline(dataCoords, {
    color: "MediumVioletRed",
    weight: 10,
    opacity: 0.8
    }, {
      easing: L.Motion.Ease.easeInOutQuad
    }, {
      removeOnEnd: false,
      icon: L.divIcon({html: "<i class='fa fa-hiking fa-2x' aria-hidden='true'></i>", iconSize: L.point(27.5, 24)})
    }).motionDuration(8000)
  ]).addTo(map);
  seqGroup.on("click", function(){
    seqGroup.motionStart();
  });
  seqGroup.on("dblclick", function(e){
    seqGroup.motionToggle();
  });
  setTimeout(function () {
    seqGroup.motionStart();
  }, 1000);
};



var wfsLayer = L.Geoserver.wfs("https://mappingforyou.eu/geoserver/worldmap/ows", {
 layers: "worldmap:debra",
});


wfsLayer.on('layeradd', function(evt) {
  var coords;
  var geometry = evt.layer.feature.geometry;
  if (geometry.type = 'MultiLineString')
    coords = geometry.coordinates[0];
  else if (geometry.type = 'LineString')
    coords = geometry.coordinates;
  else {
    return;
  }
  coords.forEach(function(coords) {
     dataCoords.push([coords[1], coords[0]]);
  });
  doMotion();
});

Screenshot_22-06-23_13:08:38

@rumbleh
Copy link

rumbleh commented Apr 21, 2023

    <style>
        .leaflet-div-icon {
            background: transparent !important;
            border: none !important;
            color: black;
        }
    </style>

@vincedchart
Copy link
Author

@rumbleh thank you !

it's working but it's creating a conflict with leaflet draw and leaflet editable, removing their handles!
(pictured are those handles at the normal state)

0te9j

@Igor-Vladyka
Copy link
Owner

@vincedchart you need to change CSS to be as specific as possible. something like:

    <style>
        .leaflet-div-icon.fa-hiking,
        .leaflet-div-icon .fa-hiking {
            background: transparent !important;
            border: none !important;
            color: black;
        }
    </style>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants