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

Add support for fill-pattern #83

Merged
merged 1 commit into from May 22, 2018

Conversation

Projects
None yet
2 participants
@songyumeng
Contributor

songyumeng commented May 22, 2018

For #82

image

@ahocevar

This comment has been minimized.

Show comment
Hide comment
@ahocevar

ahocevar May 22, 2018

Member

Thanks! This will even look nicer with openlayers/openlayers#8210.

Member

ahocevar commented May 22, 2018

Thanks! This will even look nicer with openlayers/openlayers#8210.

@ahocevar ahocevar merged commit 7b954f2 into boundlessgeo:master May 22, 2018

2 checks passed

continuous-integration/jenkins/pr-merge This commit looks good
Details
sonarqube SonarQube reported no issues
@songyumeng

This comment has been minimized.

Show comment
Hide comment
@songyumeng

songyumeng May 22, 2018

Contributor

It's cool.I found same problems about openlayers/openlayers#8210 .
I modify the ol.render.canvas.Replay.prototype.applyFill method in my project like this :

    ol.render.canvas.Replay.prototype.applyFill = function (state, geometry) {
        var fillStyle = state.fillStyle;
        var fillInstruction = [ol.render.canvas.Instruction.SET_FILL_STYLE, fillStyle];
        if (typeof fillStyle !== 'string') {
            var viewExtent = this.map.getView().getProjection().getExtent();
            fillInstruction.push([viewExtent[0], viewExtent[3]]);
        }
        this.instructions.push(fillInstruction);
    };

But this function must define after the ‘map‘ object is defined,and it is not a good solution.
Your PR for openlayers is very helpful to me.Thanks again.

Contributor

songyumeng commented May 22, 2018

It's cool.I found same problems about openlayers/openlayers#8210 .
I modify the ol.render.canvas.Replay.prototype.applyFill method in my project like this :

    ol.render.canvas.Replay.prototype.applyFill = function (state, geometry) {
        var fillStyle = state.fillStyle;
        var fillInstruction = [ol.render.canvas.Instruction.SET_FILL_STYLE, fillStyle];
        if (typeof fillStyle !== 'string') {
            var viewExtent = this.map.getView().getProjection().getExtent();
            fillInstruction.push([viewExtent[0], viewExtent[3]]);
        }
        this.instructions.push(fillInstruction);
    };

But this function must define after the ‘map‘ object is defined,and it is not a good solution.
Your PR for openlayers is very helpful to me.Thanks again.

@songyumeng songyumeng deleted the SuperMap:fill-pattern branch May 22, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment