Drawing a circle with the radius in miles/meters with Mapbox GL JS

后端 未结 4 1603
自闭症患者
自闭症患者 2020-12-08 00:15

I\'m in the process of converting a map from using mapbox.js to mapbox-gl.js, and am having trouble drawing a circle that uses miles or met

4条回答
  •  执笔经年
    2020-12-08 01:12

    This functionality is not built into GL JS but you can emulate it using functions.

    
    
    
    
      
      
      
      
      
      
    
    
    
    
      

    Important Caveats:

    • Determining the function parameters for a particular real-world measurement isn't straightforward. They change with the longitude / latitude of the feature.
    • Circles larger than 1024px aren't going to render properly due to the nature of tiled data and the way we pack data for WebGL

提交回复
热议问题