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!

Why You Can't Miss .conf25: Unleashing the Power of Agentic AI with Splunk & Cisco

The Defining Technology Movement of Our Lifetime The advent of agentic AI is arguably the defining technology ...

Deep Dive into Federated Analytics: Unlocking the Full Power of Your Security Data

In today’s complex digital landscape, security teams face increasing pressure to protect sprawling data across ...

Your summer travels continue with new course releases

Summer in the Northern hemisphere is in full swing, and is often a time to travel and explore. If your summer ...