Kratelab为MapboxGL地图提供的有用脚本。
kratelabs的Python项目详细描述
克莱特实验室设计和制造照明激光蚀刻显示器。 创新的设计只允许光通过蚀刻 艺术作品,创造独特的现代设计。对比 背景、蚀刻和高级有机玻璃的颜色 让地图作为一个非常独特的艺术品为您的家或 生意。
激光加工使我们可以用 非常精确,创建了一个非常独特和详细的图像 在全世界的位置。
我们的现代设计突出地图学作为焦点 当我们将自然景观和城市景观融合到一个设计中 我们用光来突出自己。这使得这件作品脱颖而出 用能营造氛围的自然光照亮房间 恭维现有的装饰。
无论你想保留城市景观还是熟悉的地方,克拉特实验室 通过允许每个用户 选择对他们有意义的地点。只需从 我们目前拥有的各种模板,或发送自定义请求, 我们是来帮助您为您的家或 生意。
安装
简单设置
$ git clone git@github.com:KrateLabs/KrateLabs.git $ cd KrateLabs $ make $ kratelabs --location "CN Tower, Toronto" --zoom 12[OK] Geocoded: CN Tower, Toronto, ON M5V, Canada [43.6425657, -79.38705569999999][OK] Created: CN Tower, Toronto.png [OK] Created: CN Tower, Toronto.svg
使用Docker
$ docker build -t kratelabs . $ docker run -it --rm -v $(pwd):/data kratelabs --location "CN Tower, Toronto" --zoom 12
命令行界面
$ kratelabs --help
Usage: kratelabs [OPTIONS] Command Line Interface. Options: --filename TEXT Filename output to SVG --lat FLOAT latitude for the center point of the static map; number between -90 and 90 --lng FLOAT longitude for the center point of the static map; number between -180 and 180 --location TEXT Geographical Location based on Google Maps --zoom FLOAT zoom level; number between 0 and 22 . Fractional zoom levels will be rounded to two decimal places. --width INTEGER RANGE width of the image in pixels --height INTEGER RANGE height of the image in pixels --style TEXT mapbox://styles/{username}/{style_id} --access_token TEXT Mapbox access token --bearing FLOAT Rotates the map around its center. Number between 0 and 360. --pitch FLOAT Tilts the map, producing a perspective effect. Number between 0 and 60. --retina [boolean] If @2x is added to request a retina 2x image will be returned --attribution [boolean] Value controlling whether there is attribution on the image; defaults to false --logo [boolean] Value controlling whether there is a Mapbox logo on the image; defaults to false --upload [boolean] Upload to AWS S3 --delete [boolean] Delete PNG --help Show this message and exit.
地图框样式
所有功能
- mapbox://styles/addxy/cim6u5lfi00k2cwm23exyzjim
仅限道路
- mapbox://styles/addxy/cim6u8zc300om9jm05ku5zurt
仅限水
- 地图框://styles/addxy/cim6u6b7t001l9klzpio0dhaa