{"action":"created","issue":{"url":"https://api.github.com/repos/maptalks/maptalks.js/issues/737","repository_url":"https://api.github.com/repos/maptalks/maptalks.js","labels_url":"https://api.github.com/repos/maptalks/maptalks.js/issues/737/labels{/name}","comments_url":"https://api.github.com/repos/maptalks/maptalks.js/issues/737/comments","events_url":"https://api.github.com/repos/maptalks/maptalks.js/issues/737/events","html_url":"https://github.com/maptalks/maptalks.js/issues/737","id":347600291,"node_id":"MDU6SXNzdWUzNDc2MDAyOTE=","number":737,"title":"希望 Marker 添加 rotation-alignment 可以选择根据屏幕或者地图做为旋转基准","user":{"login":"wordgold","id":3621846,"node_id":"MDQ6VXNlcjM2MjE4NDY=","avatar_url":"https://avatars0.githubusercontent.com/u/3621846?v=4","gravatar_id":"","url":"https://api.github.com/users/wordgold","html_url":"https://github.com/wordgold","followers_url":"https://api.github.com/users/wordgold/followers","following_url":"https://api.github.com/users/wordgold/following{/other_user}","gists_url":"https://api.github.com/users/wordgold/gists{/gist_id}","starred_url":"https://api.github.com/users/wordgold/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wordgold/subscriptions","organizations_url":"https://api.github.com/users/wordgold/orgs","repos_url":"https://api.github.com/users/wordgold/repos","events_url":"https://api.github.com/users/wordgold/events{/privacy}","received_events_url":"https://api.github.com/users/wordgold/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-08-04T08:26:04Z","updated_at":"2018-08-06T02:53:30Z","closed_at":"2018-08-04T14:16:31Z","author_association":"CONTRIBUTOR","body":"![image](https://user-images.githubusercontent.com/3621846/43674184-23b54b48-9802-11e8-9284-2af4d39e833c.png)\r\n![image](https://user-images.githubusercontent.com/3621846/43674220-ede8aed2-9802-11e8-92dd-dacd90cae485.png)\r\n\r\n\r\n我尝试添加 Marker ，希望可以根据地图做基准来调整方向，类似 mapbox 的以下代码：\r\n\r\n```\r\nlayout: {\r\n\t'icon-rotation-alignment': 'map', // map or view\r\n\t'icon-rotate': rotate,\r\n}\r\n```\r\n\r\n类似 http://maptalks.org/examples/cn/style/line-marker/#style_line-marker 此例中飞机的绘制效果"},"comment":{"url":"https://api.github.com/repos/maptalks/maptalks.js/issues/comments/410575092","html_url":"https://github.com/maptalks/maptalks.js/issues/737#issuecomment-410575092","issue_url":"https://api.github.com/repos/maptalks/maptalks.js/issues/737","id":410575092,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMDU3NTA5Mg==","user":{"login":"wordgold","id":3621846,"node_id":"MDQ6VXNlcjM2MjE4NDY=","avatar_url":"https://avatars0.githubusercontent.com/u/3621846?v=4","gravatar_id":"","url":"https://api.github.com/users/wordgold","html_url":"https://github.com/wordgold","followers_url":"https://api.github.com/users/wordgold/followers","following_url":"https://api.github.com/users/wordgold/following{/other_user}","gists_url":"https://api.github.com/users/wordgold/gists{/gist_id}","starred_url":"https://api.github.com/users/wordgold/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wordgold/subscriptions","organizations_url":"https://api.github.com/users/wordgold/orgs","repos_url":"https://api.github.com/users/wordgold/repos","events_url":"https://api.github.com/users/wordgold/events{/privacy}","received_events_url":"https://api.github.com/users/wordgold/received_events","type":"User","site_admin":false},"created_at":"2018-08-06T02:53:30Z","updated_at":"2018-08-06T02:53:30Z","author_association":"CONTRIBUTOR","body":"@fuzhenn \r\n\r\n```\r\n          const rotate = bearing(point(this.task.Coordinate[0]), point(this.task.Coordinate[1]));\r\n          car.updateSymbol({\r\n            markerRotation: {\r\n              property: '{bearing}',\r\n              stops: [\r\n                [-180, -180 - rotate],\r\n                [180, 180 - rotate],\r\n              ],\r\n            },\r\n          });\r\n```"}}
{"actor":{"display_login":"wordgold"}}