Just keep holding that ticket https://toolset.com/forums/topic/display-a-random-address-on-google-mao/
Could you please help me to revise that piece of code to make the longitude and latitude randomly, so that the markers on google map will be within a proper range. please just make longitude and latitude randomly after 2 digits of the decimal point
for example
Longitude -122.351110 be random from 1110
Latitude 47.619746 be random from 9746
Thank you so much!
Hello,
There isn't such a built-in feature within Toolset maps plugin, and it needs custom codes, and it will take effect on the google map, and it might produce other unexpected result, please confirm it, if you still need assistance for it, please backup your website, I can setup a demo codes in it.
Sure, please implement your code, I have made a backup copy. Thanks
OK, I am checking it in your website, will feedback if there is anything found
按照你的要求我已经修改了php代码:
hidden link
使用该custom shortcode的方法如下:
<p>原先的LATITUDE:[types field='my-location' format="FIELD_LATITUDE"][/types]</p>
<p>原先的LONGITUDE:[types field='my-location' format="FIELD_LONGITUDE"][/types]</p>
<hr />
<p>生成的新LATITUDE:[random_address][types field='my-location' format="FIELD_LATITUDE"][/types][/random_address]</p>
<p>生成的新LONGITUDE:[random_address][types field='my-location' format="FIELD_LONGITUDE"][/types][/random_address]</p>
见结果页面:
hidden link
我将这段代码插入 marker的简码中的 lon='' 和 lat="" 运行的非常好,非常非常的感谢!!!:)