Skip to Main Content

Batched Results

8501
The Rows Per Batch plugin attribute has been set to 1000. This causes the plugin to load the pins in multiple ajax calls. Using this attribute increases the overall time required to load all the data, but allows the map to start showing some pins earlier, making it more user-friendly.

As each batch is received, the map will expand the bounds (pan & zoom) to show the new pins.

As each intermediate batch is received, the batchLoaded event fires. It usually does not fire after the last batch, although it is possible (in the edge case when the total rows is an exact multiple of the batch size).

When the last batch is received, the mapLoaded event fires.


Side note: for the marker styling, the JavaScript Initialization Code is: this.options.markerFormatFn = function(marker, flex) { var mag = parseFloat(flex.a1) ,iconName; if (mag > 4.5) { iconName = 'capital_small_highlight.png'; } else if (mag > 3.0) { iconName = 'capital_small.png'; } else if (mag > 1.5) { iconName = 'placemark_circle_highlight.png'; } else { iconName = 'placemark_circle.png'; } // these icons are 32x32 images, more-or-less centered marker.icon = { url: 'https://maps.google.com/mapfiles/kml/shapes/' + iconName, anchor: new google.maps.Point(15, 16) }; marker.title = 'Magnitude:' + flex.a1; marker.setOpacity(0.5); }