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

Fix for setting of the layer name #93

Merged
merged 1 commit into from
Apr 25, 2015
Merged

Fix for setting of the layer name #93

merged 1 commit into from
Apr 25, 2015

Conversation

juristr
Copy link
Collaborator

@juristr juristr commented Apr 22, 2015

This piece of code doesn't work any more in the latest version:

olData.getMap().then(function(map) {
    var layers = map.getLayers();
    layers.forEach(function(layer) {
        if (layer.get('name') === 'japan') {
            var extent = layer.getSource().getExtent();
            map.getView().fitExtent(extent, map.getSize());
        }
    })
});

The problem is that the layer name is no more set correctly as already mentioned in issue #92. This PR fixes it.

Btw, one should add tests to make sure this doesn't happen again. I'd also be willing to add them, but the current tests on master don't pass and it would take me too long to figure out why.

juristr referenced this pull request Apr 22, 2015
…or setting styles that vary for each feature in a feature collection.

Modifed example 045 to have a circle at Lisbon.  Added example 058 showing
styling using a function.
@tombatossals tombatossals reopened this Apr 25, 2015
@tombatossals
Copy link
Owner

Uff you're right there was one tests not passing and all the PR are inconsistent. Commented the invalid tests.

Thanks for your PR, good work, I'm merging it.

tombatossals added a commit that referenced this pull request Apr 25, 2015
Fix for setting of the layer name
@tombatossals tombatossals merged commit 8f9eb82 into tombatossals:master Apr 25, 2015
@juristr juristr deleted the bug-layername-not-set branch April 26, 2015 09:20
@juristr
Copy link
Collaborator Author

juristr commented Apr 27, 2015

@tombatossals Hi, thx for merging in. Could you also release these latest bugfixes on bower as a v0.0.5? That'd be great, thx!

@tombatossals
Copy link
Owner

Of course, it's done.

@juristr
Copy link
Collaborator Author

juristr commented Apr 27, 2015

Awesome 👍 Thx a lot!

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

Successfully merging this pull request may close these issues.

2 participants