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!

Index This | Forward, I’m heavy; backward, I’m not. What am I?

April 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

A Guide To Cloud Migration Success

As enterprises’ rapid expansion to the cloud continues, IT leaders are continuously looking for ways to focus ...

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...