阅读背景:

点击国家/地区特定图层时链接到网址的世界地图

来源:互联网 

I am trying to make a map of the world using Mapbox that will have a different layer for each country. I want to use it to where when a country's layer is clicked on, it will link to a specific url on my website for that country. I know I need to use on('click') to do this, but cant figure out how. In this map so far I have a layer (would this be a vector tile) for Chile, so I would want the click on the layer 'chile' to link to a url to an external webpage about Chile. I have played around with it for days and have nothing. I apologize I have very little code experience but appreciate any help! This is the base of what I have from Mapbox:I am trying to make a map of the world using Ma




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: