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

Move customMeasureStyle to the AbstractMobileController #4749

Merged
merged 1 commit into from
Mar 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
29 changes: 0 additions & 29 deletions contribs/gmf/apps/mobile_alt/Controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ import './sass/mobile_alt.scss';
import appBase from '../appmodule.js';
import EPSG2056 from '@geoblocks/proj/src/EPSG_2056.js';
import EPSG21781 from '@geoblocks/proj/src/EPSG_21781.js';
import olStyleFill from 'ol/style/Fill.js';
import olStyleRegularShape from 'ol/style/RegularShape.js';
import olStyleStroke from 'ol/style/Stroke.js';
import olStyleStyle from 'ol/style/Style.js';
import Raven from 'raven-js/src/raven.js';
import RavenPluginsAngular from 'raven-js/plugins/angular.js';

Expand Down Expand Up @@ -68,31 +64,6 @@ class Controller extends AbstractMobileController {
*/
this.searchCoordinatesProjections = [EPSG21781, EPSG2056, 'EPSG:4326'];


/**
* @type {import("ol/style/Style.js").default}
*/
this.customMeasureStyle = new olStyleStyle({
fill: new olStyleFill({
color: 'rgba(255, 128, 128, 0.2)'
}),
stroke: new olStyleStroke({
color: 'rgba(255, 0, 0, 0.5)',
lineDash: [10, 10],
width: 2
}),
image: new olStyleRegularShape({
stroke: new olStyleStroke({
color: 'rgba(255, 0, 0, 0.7)',
width: 2
}),
points: 4,
radius: 8,
radius2: 0,
angle: 0
})
});

if ($injector.has('sentryUrl')) {
const options = $injector.has('sentryOptions') ? $injector.get('sentryOptions') : undefined;
const raven = new Raven();
Expand Down
26 changes: 26 additions & 0 deletions contribs/gmf/src/controllers/AbstractMobileController.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import olControlRotate from 'ol/control/Rotate.js';
import * as olInteraction from 'ol/interaction.js';
import olStyleCircle from 'ol/style/Circle.js';
import olStyleFill from 'ol/style/Fill.js';
import olStyleRegularShape from 'ol/style/RegularShape.js';
import olStyleStroke from 'ol/style/Stroke.js';
import olStyleStyle from 'ol/style/Style.js';

Expand Down Expand Up @@ -57,6 +58,31 @@ export class AbstractMobileController extends AbstractAppController {
olInteraction.defaults({pinchRotate: true})
}), $scope, $injector);


/**
* @type {import("ol/style/Style.js").default}
*/
this.customMeasureStyle = new olStyleStyle({
fill: new olStyleFill({
color: 'rgba(255, 128, 128, 0.2)'
}),
stroke: new olStyleStroke({
color: 'rgba(255, 0, 0, 0.5)',
lineDash: [10, 10],
width: 2
}),
image: new olStyleRegularShape({
stroke: new olStyleStroke({
color: 'rgba(255, 0, 0, 0.7)',
width: 2
}),
points: 4,
radius: 8,
radius2: 0,
angle: 0
})
});

/**
* @type {boolean}
*/
Expand Down