Skip to content

Setting options for MarkerCollectionLayer #117

Description

@mjanda

I'm thinking how to set options on markers belonging to collectionlayer.

One way is to set options key on content and change layers/marker.js

options: null,

to

options: Ember.computed.alias('content.options'),

Not sure if that won't break something else, so far I'm just thinking out loud here.

Other way would be to do it in collection.js / objectWasAdded() - do something like

var childLayer = this.createChildLayer(get(this, 'itemLayerClass'), {
content: obj,
options: obj.options
});

but that seems hacky.
But doing it this way would easily allow having global options on collection itself and optionally overriding them on some markers.

Any ideas before I'll put together PR?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions