-
Notifications
You must be signed in to change notification settings - Fork 419
fix #1176 implemented GraticuleLayer for leaflet #1180
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/** | ||
* Copyright 2015, GeoSolutions Sas. | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the BSD-style license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
const Layers = require('../../../../utils/leaflet/Layers'); | ||
const SimpleGraticule = require('leaflet-simple-graticule/L.SimpleGraticule'); | ||
const assign = require('object-assign'); | ||
|
||
require('leaflet-simple-graticule/L.SimpleGraticule.css'); | ||
|
||
Layers.registerType('graticule', { | ||
create: (options) => { | ||
const graticuleOptions = assign({ | ||
interval: 20, | ||
showshowOriginLabel: true, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. showOriginLabel There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should i keep this showOriginLabel:(0,0) as initiial parameter ? instead of true There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, the name is wrong, no showshowOriginLabel but showOriginLabel There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok |
||
redraw: 'move' | ||
}, options); | ||
if (SimpleGraticule) { | ||
return new SimpleGraticule(graticuleOptions); | ||
} | ||
return false; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. return null; |
||
}, | ||
isValid: () => { | ||
return SimpleGraticule ? true : false; | ||
} | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2016