Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resourceset geometry should define object shape, but not visuals #205

Open
KvotheBloodless opened this issue Nov 26, 2024 · 6 comments
Open

Comments

@KvotheBloodless
Copy link

KvotheBloodless commented Nov 26, 2024

This is more of a feature request than an issue, depending on perspective.

Currently, using a resource provider with Freeboard, we are able to set some very basic style parameters to render the geometry of a resource, this is too restrictive to be able to provide good UX.

For example, consider 2 entirely unrelated object types both defined with a geometry of type point. It is only possible at this stage to display a small circle for each, at best with a different fill or stroke.

I would like to propose that the geometry define the location (point) or draw the outline (polygone etc...), and the style attributes be used instead to specify some kind of map marker. This example shows 3 point resources, each or a different type which is immediately clear to the user.
image

Possibly a generic map marker shape with the ability to change color and provide the SVG icon would be an excellent outcome.

@panaaj
Copy link
Member

panaaj commented Nov 27, 2024

The style attributes supported in resource sets is intentionally minimal as to not skew the definition towards purely towards what OpenLayers can support.
An image is probably the best solution in this case but the challenge is that the image must be part of the Freeboard app distributable or a fully qualified path to a location accessible when running in the browser.

@KvotheBloodless
Copy link
Author

Thanks Adrian.

So if we break this down, there are 2 things to consider.

  • How can Freeboard's Resourceset protocol be extended so it is possible to specify an image to display instead of (or in addition to) the geometry?
  • The only way I could think a resource provider could supply it's own images would be by registering as a webapp... which is not the intended use of the webapp framework. As you suggested, the alternative would be for Freeboard to supply a library of image icons to reference. What do you think?

@panaaj
Copy link
Member

panaaj commented Nov 27, 2024

After sleeping on it, a common set of icons available to all apps IMHO would be an appropriate solution.

They could be made available at a common path e.g. /signalk/v2/api/resources/icons and deployed by a plugin which can be managed as a GitHub repo.

@tkurki
Copy link
Member

tkurki commented Nov 28, 2024

Icons at a well known path would be a great idea imho! Don't know how complex we want to go, we can start with something very straightforward like just one size, scalable format = svg. Create a separate issue in server or specification?

@panaaj
Copy link
Member

panaaj commented Nov 28, 2024

@panaaj panaaj closed this as not planned Won't fix, can't repro, duplicate, stale Nov 28, 2024
@KvotheBloodless
Copy link
Author

@panaaj should this ticket be left open for the work to enable the Resourceset to specify the icon to use in Freeboard?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants