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!

Fall Into Learning with New Splunk Education Courses

Every month, Splunk Education releases new courses to help you branch out, strengthen your data science roots, ...

Super Optimize your Splunk Stats Searches: Unlocking the Power of tstats, TERM, and ...

By Martin Hettervik, Senior Consultant and Team Leader at Accelerate at Iver, Splunk MVPThe stats command is ...

How Splunk Observability Cloud Prevented a Major Payment Crisis in Minutes

Your bank's payment processing system is humming along during a busy afternoon, handling millions in hourly ...