<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: sarahch29</title>
    <description>The latest articles on DEV Community by sarahch29 (@sarahch29).</description>
    <link>https://dev.to/sarahch29</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F899587%2F8d0ffe15-3a56-45d4-a060-08984f3cc6e7.png</url>
      <title>DEV Community: sarahch29</title>
      <link>https://dev.to/sarahch29</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sarahch29"/>
    <language>en</language>
    <item>
      <title>Mouse over leaflet problem</title>
      <dc:creator>sarahch29</dc:creator>
      <pubDate>Thu, 28 Jul 2022 14:50:00 +0000</pubDate>
      <link>https://dev.to/sarahch29/mouse-over-leaflet-problem-346g</link>
      <guid>https://dev.to/sarahch29/mouse-over-leaflet-problem-346g</guid>
      <description>&lt;p&gt;hello guys!&lt;br&gt;
i'm facing a problem of mouseover event  in leaflet  &lt;/p&gt;

&lt;p&gt;here is my code :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function highlightFeature(e) {
        var layer = e.target;
        const { name, CWILAYA } = e.target.feature.properties;
        setSelected({
            name: name,
            CWILAYA: CWILAYA

        });
        layer.setStyle({
            weight: 6,// change the weight  of  a state 
            fillOpacity: 1
        });
        if (!L.Browser.ie &amp;amp;&amp;amp; !L.Browser.opera &amp;amp;&amp;amp; !L.Browser.edge) {
            layer.bringToFront();
        }
    }
function onEachFeature(feature, layer) {
            layer.on({
                mouseover: highlightFeature,// call the function when mouseover  
            });
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---biv_x1G--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ppvsrlr1pvzzv2aiqycy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---biv_x1G--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ppvsrlr1pvzzv2aiqycy.png" alt="Image description" width="628" height="590"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;when i hover ,the weight of the city  changes for 2s and it doesn't stay highlighted even though the mouse is over the city &lt;/p&gt;

&lt;p&gt;can you please help me !&lt;br&gt;
thank you &lt;/p&gt;

</description>
      <category>leaflet</category>
      <category>react</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
