All Apps and Add-ons

Does the Google Maps App have a marker limitation?

jedatt01
Builder

I have created a custom implementation of the google maps mvc via web framework. I've noticed that no matter how many rows of data I pipe into the map from the search manager, the map will only display a maximum of 100 markers. I've checked in the javascript console and I can see clearly that my marker array is always capped at [100]. I've looked through the Google Maps app source code trying to figure out where this limitation is set but I cannot find it anyway. Does anyone have any idea why this is happening?

Additional Information:

I tested this limit by creating a separate variable to store the search manager object before passing it into the googlemaps mvc........and it has 196 rows......but when I look that the object that is sent to the googlemaps mvc it is again capped at 100. Why is this happening?

before passing to googlemaps mvc:

u.has.r {cid: "c242", attributes: Object, _changing: false, _previousAttributes: Object, changed: Object…}
_changing: false
_data: Object
fields: Array[9]
init_offset: 0
messages: Array[26]
preview: false
rows: Array[196]
[0 … 99]
[100 … 195]
length: 196
__proto__: Array[0]
__proto__: Object
_events: Object
_isFetching: false
_pending: false
_pendingFetchOptions: null
_previousAttributes: Object
attributes: Object
changed: Object
cid: "c242"
__proto__: i

After passing to googlemaps mvc:

    u.has.r {cid: "c1755", attributes: Object, _changing: false, _previousAttributes: Object, changed: Object…}
    _changing: false
    _data: Object
    fields: Array[9]
    init_offset: 0
    messages: Array[26]
    preview: false
    rows: Array[100]
    length: 100
    __proto__: Array[0]
    __proto__: Object
    _events: Object
    _isFetching: false
    _pending: false
    _pendingFetchOptions: null
    _previousAttributes: Object
    attributes: Object
    changed: Object
    cid: "c1755"
    __proto__: i
0 Karma
1 Solution

jedatt01
Builder

With some help on Stackoverflow I was able to resolve this myself.
http://stackoverflow.com/questions/27841198/jquery-collection-array-length-being-capped-at-100/27841...

The googlemapview.js needs to be modified to remove the 100 result limit for the Splunk JS SDK. This is not a limitation of the googlemaps app, but is a default settings in the Splunk JS SDK. Reference this answers post for details on the limitation. http://answers.splunk.com/answers/52782/100-result-limit-in-js-sdk.html.

Below is the code that needs to be modified in googlemapview.js

Original

this.resultsModel = manager.data(this.settings.get("data"), {
            output_mode: "json_rows"
});

Modified

this.resultsModel = manager.data(this.settings.get("data"), {
            output_mode: "json_rows",
            count: 0
});

View solution in original post

jedatt01
Builder

With some help on Stackoverflow I was able to resolve this myself.
http://stackoverflow.com/questions/27841198/jquery-collection-array-length-being-capped-at-100/27841...

The googlemapview.js needs to be modified to remove the 100 result limit for the Splunk JS SDK. This is not a limitation of the googlemaps app, but is a default settings in the Splunk JS SDK. Reference this answers post for details on the limitation. http://answers.splunk.com/answers/52782/100-result-limit-in-js-sdk.html.

Below is the code that needs to be modified in googlemapview.js

Original

this.resultsModel = manager.data(this.settings.get("data"), {
            output_mode: "json_rows"
});

Modified

this.resultsModel = manager.data(this.settings.get("data"), {
            output_mode: "json_rows",
            count: 0
});
Get Updates on the Splunk Community!

Prove Your Splunk Prowess at .conf25—No Prereqs Required!

Your Next Big Security Credential: No Prerequisites Needed We know you’ve got the skills, and now, earning the ...

Splunk Observability Cloud's AI Assistant in Action Series: Observability as Code

This is the sixth post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how to ...

Splunk Answers Content Calendar, July Edition I

Hello Community! Welcome to another month of Community Content Calendar series! For the month of July, we will ...