iOS Question MarkerClusterer

valentino s

Active Member
Licensed User
Longtime User
I've done today in my app (both b4a and b4i): http://www.iusondemand.eu/app/preghiere.php with openstreetmap (OSM), leaflet and an external plugin. To test install and tap button "messaggi" then "santuari".

Please take care of the versions. Don't use elder versions.

B4X:
  <link rel="stylesheet" type="text/css" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" />
  <link rel="stylesheet" type="text/css" href="http://cdnjs.cloudflare.com/ajax/libs/leaflet.markercluster/0.4.0/MarkerCluster.css" />
  <link rel="stylesheet" type="text/css" href="http://cdnjs.cloudflare.com/ajax/libs/leaflet.markercluster/0.4.0/MarkerCluster.Default.css" />

  <script type='text/javascript' src='https://code.jquery.com/jquery-2.1.4.min.js'></script>
  <script type='text/javascript' src='http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js?2'></script>
  <script type='text/javascript' src='http://cdnjs.cloudflare.com/ajax/libs/leaflet.markercluster/0.4.0/leaflet.markercluster.js'></script>

  <div id="map" style="width: 100%; height: 440px; border: 1px solid #AAA;"></div>

  <script type='text/javascript' src='xxx/markerslist-to-json.php'></script>
  <script type='text/javascript' src='xxx/maps/leaf-demo.js'></script>
    <script type='text/javascript' src='http://cdnjs.cloudflare.com/ajax/libs/leaflet.markercluster/0.4.0/leaflet.markercluster.js'></script>

The problem is that we let the hard work to javascript. It's slow the first run. Then all files are cached and all seems very fast.

So probably it's better not to cluster anything and to use the native map. I'll continue my tests.
 
Last edited:
Upvote 0
Top