{"action":"created","issue":{"url":"https://api.github.com/repos/TerriaJS/terriajs/issues/1089","repository_url":"https://api.github.com/repos/TerriaJS/terriajs","labels_url":"https://api.github.com/repos/TerriaJS/terriajs/issues/1089/labels{/name}","comments_url":"https://api.github.com/repos/TerriaJS/terriajs/issues/1089/comments","events_url":"https://api.github.com/repos/TerriaJS/terriajs/issues/1089/events","html_url":"https://github.com/TerriaJS/terriajs/issues/1089","id":117810075,"number":1089,"title":"Support specifying a marker image to use for points in GeoJSON","user":{"login":"rsignell-usgs","id":1872600,"avatar_url":"https://avatars1.githubusercontent.com/u/1872600?v=4","gravatar_id":"","url":"https://api.github.com/users/rsignell-usgs","html_url":"https://github.com/rsignell-usgs","followers_url":"https://api.github.com/users/rsignell-usgs/followers","following_url":"https://api.github.com/users/rsignell-usgs/following{/other_user}","gists_url":"https://api.github.com/users/rsignell-usgs/gists{/gist_id}","starred_url":"https://api.github.com/users/rsignell-usgs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsignell-usgs/subscriptions","organizations_url":"https://api.github.com/users/rsignell-usgs/orgs","repos_url":"https://api.github.com/users/rsignell-usgs/repos","events_url":"https://api.github.com/users/rsignell-usgs/events{/privacy}","received_events_url":"https://api.github.com/users/rsignell-usgs/received_events","type":"User","site_admin":false},"labels":[{"id":331577885,"url":"https://api.github.com/repos/TerriaJS/terriajs/labels/C-Catalogue","name":"C-Catalogue","color":"555577","default":false},{"id":331577900,"url":"https://api.github.com/repos/TerriaJS/terriajs/labels/C-Leaflet/Cesium","name":"C-Leaflet/Cesium","color":"557755","default":false},{"id":82546345,"url":"https://api.github.com/repos/TerriaJS/terriajs/labels/T-Enhancement","name":"T-Enhancement","color":"5555EE","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2015-11-19T13:05:27Z","updated_at":"2018-02-19T06:52:47Z","closed_at":null,"author_association":"COLLABORATOR","body":"We could have a solution to issue #1063  and other situations if TerriaJS supported reading `divIcon` from the GeoJSON.   Currently, [the TerrisJS code specifies a specific divIcon icon](https://github.com/TerriaJS/terriajs/blob/master/lib/Models/Leaflet.js#L61-L64) (the SVG image [here](https://github.com/TerriaJS/terriajs/blob/master/wwwroot/images/NM-LocationTarget.svg)).  \n\nTo display fields of vectors as well as other symbols, it would be great if it could read the `divIcon` from the GeoJSON files like this one:\n\n```\n{\n    \"type\": \"FeatureCollection\", \n    \"features\": [\n        {\n            \"geometry\": {\n                \"type\": \"Point\", \n                \"coordinates\": [\n                    -85.427040100097656, \n                    29.559053421020508\n                ]\n            }, \n            \"type\": \"Feature\", \n            \"properties\": {\n                \"anchor_x\": 6.0527030838993801, \n                \"html\": \"<svg width=\\\"8px\\\" height=\\\"5px\\\" viewBox=\\\"-6.0527030839 -3.0210785979 8.0 5.0\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\" version=\\\"1.1\\\">  <path d=\\\"M -0.249865829246 0.485500365554 L -0.7353661948 0.235634536307 L -0.749597487739 1.45650109666 L -4.85500365554 -2.49865829246 L 0.749597487739 -1.45650109666 L -0.235634536307 -0.7353661948 L 0.249865829246 -0.485500365554 L -0.249865829246 0.485500365554\\\" fill-opacity=\\\"None\\\" stroke=\\\"#000000\\\" stroke-width=\\\"0\\\" stroke-opacity=\\\"None\\\" fill=\\\"#FFFFFF\\\" /></svg>\", \n                \"anchor_y\": 3.0210785979007113\n            }\n        }, \n        {\n            \"geometry\": {\n                \"type\": \"Point\", \n                \"coordinates\": [\n                    -85.427627563476562, \n                    29.590583801269531\n                ]\n            }, \n            \"type\": \"Feature\", \n            \"properties\": {\n                \"anchor_x\": 5.3397999770157512, \n                \"html\": \"<svg width=\\\"7px\\\" height=\\\"6px\\\" viewBox=\\\"-5.33979997702 -3.68950133111 7.0 6.0\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\" version=\\\"1.1\\\">  <path d=\\\"M -0.272844247079 0.449813269527 L -0.722657516606 0.176969022448 L -0.818532741238 1.34943980858 L -4.49813269527 -2.72844247079 L 0.818532741238 -1.34943980858 L -0.176969022448 -0.722657516606 L 0.272844247079 -0.449813269527 L -0.272844247079 0.449813269527\\\" fill-opacity=\\\"None\\\" stroke=\\\"#000000\\\" stroke-width=\\\"0\\\" stroke-opacity=\\\"None\\\" fill=\\\"#FFFFFF\\\" /></svg>\", \n                \"anchor_y\": 3.6895013311055687\n            }\n        }, \n    ]\n}\n```\n"},"comment":{"url":"https://api.github.com/repos/TerriaJS/terriajs/issues/comments/366602554","html_url":"https://github.com/TerriaJS/terriajs/issues/1089#issuecomment-366602554","issue_url":"https://api.github.com/repos/TerriaJS/terriajs/issues/1089","id":366602554,"user":{"login":"kring","id":924374,"avatar_url":"https://avatars0.githubusercontent.com/u/924374?v=4","gravatar_id":"","url":"https://api.github.com/users/kring","html_url":"https://github.com/kring","followers_url":"https://api.github.com/users/kring/followers","following_url":"https://api.github.com/users/kring/following{/other_user}","gists_url":"https://api.github.com/users/kring/gists{/gist_id}","starred_url":"https://api.github.com/users/kring/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kring/subscriptions","organizations_url":"https://api.github.com/users/kring/orgs","repos_url":"https://api.github.com/users/kring/repos","events_url":"https://api.github.com/users/kring/events{/privacy}","received_events_url":"https://api.github.com/users/kring/received_events","type":"User","site_admin":false},"created_at":"2018-02-19T06:52:47Z","updated_at":"2018-02-19T06:52:47Z","author_association":"OWNER","body":"Relevant comment from @stevage on #1063:\r\n\r\n> #1089 is kind of a hacky way of supporting customer markers in GeoJSON files. In Leaflet, a \"divIcon\" is a way of embedding custom HTML at a point, and is being used here as a way of jamming the contents of an SVG file at the point, as expressed by an html property. It would be cleaner to indicate explicitly that this is an image, like markerImage or something. Unfortunately SimpleStyle doesn't support custom markers (only names of maki icons). So, if we're going to support custom markers in GeoJSON, let's rework this slightly."}}
{"actor":{"display_login":"kring"}}