Closed ryanbaumann closed 1 year ago
This would be very useful.
How difficult would it be do also add .svg support for vector images? PNGs often don’t look very sharp unless they have the exact size.
Just an idea… thanks.
From: Ryan Baumann Sent: Saturday, March 31, 2018 10:56 AM To: mapbox/mapboxgl-powerbi Cc: Subscribed Subject: [mapbox/mapboxgl-powerbi] Add symbol layer type (#87)
Proposal Developers want to be able to create icons to drop into their map visualization, in addition to circles, for point type data. This issue tracks adding symbol layer support to the Mapbox Visual for Power BI. Design
@PedroRiveraTorresMoir yes, we can add support for any image type that can render out to a canvas element easily with the addImage API https://www.mapbox.com/mapbox-gl-js/api#map#addimage. Here's a basic developer example of using Mapbox GL JS to accept an SVG image (a triangle) and changing it's style (icon-color, halo-color, and icon-rotation) on-the-fly based on values in a point dataset .
I updated the design criteria in the OP to reflect supporting SVG icons - thanks!
A couple comments on this:
This didn't make 1.3 so should be re-scoped (1.6?)
Could this be done by implementing HTML markers? This demo got me salivating.
@otravers yes, we could implement this using HTML markers vs. symbols, especially with clustering. I would recommend adding that as a separate feature request.
Symbol layer should contain the same viz class base layers as all other visualizations (
visibility
,opacity
,minzoom
, andmaxzoom
.) Symbol layer should allow users to adjust the size and color of the icon based on data values, just like circles.
It might be worth also exposing some other properties as Power BI fields so they can be data-driven, such as icon-rotate, to mirror marker layer settings shown in this example built with Tibco Spotfire.
I have a customer who would greatly appreciate the ability to use symbols (based on values) other than the default circle icon.
Proposal
Developers want to be able to create icons to drop into their map visualization, in addition to circles, for point type data. This issue tracks adding
symbol
layer support to the Mapbox Visual for Power BI.Design
visibility
,opacity
,minzoom
, andmaxzoom
.)