Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 71531

Google maps delay on adding too much markers on IOS

$
0
0

@inartech wrote:

Hello guys

There is a lot of delay on IOS when i add too many markers on a google map. I use a for loop. I have markers in an array and i use this code:

                   for(var i=0; i<this.municipalityList.length; i++){

			this.map.addMarker({
				title: 'title',
				snippet: 'snippet',
				icon: { 'url': 'assets/icons/municipality_marker.png' },
				animation: 'DROP',
				position: {
				  lat: this.municipalityList[i]['lat'],
				  lng: this.municipalityList[i]['lng']
				}
			})
			.then(marker => {

				marker.on(GoogleMapsEvent.MARKER_CLICK)
				.subscribe(() => {
					console.log('Marker clicked');
				});
			});

		}

Do you have any idea to improve this??? Thanks…

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 71531

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>