Dashboards & Visualizations

Cluster Map - Map center and zoom not working

Shaw
Explorer

Hello,

I have a strange behavior with one of my panel where i have a clustered map.
Pratically i have two imput panel, one that permit the selection of a country, and the second one who permit the selection of a city.
Depending on the city select i have two tokens that saves the respecting lat and lgt of the city, and then in the xml source i give this two toker for centering the map.

Pratically the result is blank, but if during editing before saving i go the source tab then the visualization works.
But then if i refresh the page the map doesn't appear anymore.

Hero the code that i'm using:
<search>
<query>| inputlookup Worldcities.csv      
| search city = $Area$
| dedup city
</query>
<done>
<set token="lat">$result.lat$</set>
<set token="lng">$result.lng$</set>
<set token="zoom">7</set>
</done>
</search>
<fieldset submitButton="false">
<input type="dropdown" token="country">
<label>Country</label>
<fieldForLabel>name</fieldForLabel>
<fieldForValue>name</fieldForValue>
<search>
<query>| inputlookup Country.csv
| search name= Spain OR name = Italy</query>
<earliest>-15m</earliest>
<latest>now</latest>
</search>
<default>Italy</default>
</input>
<input type="dropdown" token="Area" searchWhenChanged="true">
<label>Area</label>
<fieldForLabel>city</fieldForLabel>
<fieldForValue>city</fieldForValue>
<search>
<query>| inputlookup Worldcities.csv
| search country = $country$
| dedup city</query>
<earliest>-24h@h</earliest>
<latest>now</latest>
</search>
<default>Milan</default>
</input>
</fieldset>

<map>
<search>
<query>(query that gives me the value needed)
| geostats latfield=Latitude longfield=Longitude globallimit=0 maxzoomlevel=13 translatetoxy=false count by test</query>
<earliest>-24h@h</earliest>
<latest>now</latest>
<refresh>30s</refresh>
<refreshType>delay</refreshType>
</search>
<option name="drilldown">none</option>
<option name="mapping.map.center">($lat$,$lng$)</option>
<option name="mapping.map.zoom">7</option>
<option name="mapping.type">marker</option>
<option name="refresh.display">progressbar</option>
</map>

Is something wrong with the code or it's just a bug? 
Thank you

Labels (2)
0 Karma
Get Updates on the Splunk Community!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...