2

foreword

天地图默认地图样式
The company has been busy recently, and I don’t have time to post some blog posts. Recently, the project needs to display the map on a large screen. Most of the large screens use a dark blue base map. At present, Tiantu does not provide dark blue tiles, and comes with its own JS API. Only black and indigo are supported, but the project requires a sky map. The search engine searched for a solution, and there were all kinds of bells and whistles, and finally decided to use CSS filter to solve this problem, and recorded the solution in the blog.

inspiration

https://blog.csdn.net/Corey_mengxiaodong/article/details/84619875

Through the introduction of this blog post, the direction is roughly determined, that is to use filter:url() plus the function of the predefined effect to adjust the final effect.

method

  1. Open: CSS Filter Editor
  2. Upload the screenshot of the sky map to the editor, adjust the presets below and the parameters on the right
    调整参数
  3. Place the svg preset in the <body>, add the CSS generated by the CSS Code column in the editor to the canvas of the sky map
    CSS Code
    天地图改色效果
If the preset does not have the desired effect, you can use the SVG Gradient Map Filter to call up one yourself

Show results

The final display effect after adjustment, who would have thought that this turned out to be a map of the sky?
调整后的最终展示效果


SangSir
1.1k 声望2.5k 粉丝

艺术界的一朵奇葩