OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Leaflet: Uncaught TypeError: L.markerClusterGroup is not a function

  • Thread starter Thread starter Tenz
  • Start date Start date
T

Tenz

Guest
I am trying to add markercluster into leaflet.

Code:
var markers = L.markerClusterGroup();

My header file include:

Code:
   script(src='https://unpkg.com/[email protected]/dist/leaflet.js')
   link(type='text/css', rel='stylesheet', href='/stylesheets/MarkerCluster.css')
   link(type='text/css', rel='stylesheet', href='/stylesheets/MarkerCluster.Default.css')        
   script(src=/javascripts/leaflet.markercluster-src.js')

But I keep getting the error of : L.markerClusterGroup is not a function

I am not sure why I get that error.

<p>I am trying to add markercluster into leaflet. </p>

<pre><code>var markers = L.markerClusterGroup();
</code></pre>

<p>My header file include:</p>

<pre><code> script(src='https://unpkg.com/[email protected]/dist/leaflet.js')
link(type='text/css', rel='stylesheet', href='/stylesheets/MarkerCluster.css')
link(type='text/css', rel='stylesheet', href='/stylesheets/MarkerCluster.Default.css')
script(src=/javascripts/leaflet.markercluster-src.js')
</code></pre>

<p>But I keep getting the error of : L.markerClusterGroup is not a function</p>

<p>I am not sure why I get that error. </p>
 

Latest posts

Online statistics

Members online
0
Guests online
3
Total visitors
3
Ads by Eonads
Top