Hello. Thank you for contacting the Toolset support.
It is done this way because Toolset does not have a UI to specify a map center using a custom field of the current post.
==>
Ok, this is known.
The issue arises when there are multiple views on a page since $view_settings['map_distance_filter']['map_center_lat'] = $latlon[0]; affects all of them.
==>
I'm not sure what you mean here. Can you please share it by example.
Here's the same page with the snippet disabled - hidden link (random places appear in the 'nearby places' view). But here you see that the other views (such as quotes) start showing items.
==>
What item you mean shows the item? you wrote "But here you see that the other views (such as quotes) start showing items.", I'm not sure about what filter option you are talking about.
I would appreciate any additional direction on this. Is there a way to set a map center for each view individually? Would love to see a -native UI support for this in ideal scenario.
==>
Well, the code we wrote in such a way that its getting the lat,lon of the currently displayed post from the custom field "place-address": so, we are actually getting the map center from the custom field "place-address" and it will be fetched from the currently displayed post as you can see the following line is added within code I shared before:
$latlong=types_render_field("place-address",array('format'=>"FIELD_LATITUDE,FIELD_LONGITUDE",'item'=>$post->ID));
Or perhaps other views should not even react to $view_settings['map_distance_filter']['map_center_lat'] = $latlon[0] , since their query has nothing to do with distance at all? 🤷♀️
==>
What you mean by other view? do you mean when you filter your view, select the option from the select dropdown "NEARBY", it shows wrong results?
If mapcenter could be provided with a shortcode like in the screenshot, that would work as well.
=>
As you know, its not working as you know from the previous ticket and that will also not work as you want map center to be with specific post.
If you can share what is your expected result with what URL and what steps I have to follow and share admin details I would be happy to look at it again. Please share all required details and answer all above questions and lets see what we can do here.