Help Add the Option for 'ol/layer/Graticule' to Specify the Projection to Draw
See original GitHub issueIs your feature request related to a problem? Please describe. I want to draw TWD67 (the graticule for Taiwan), except for the hard-coded EPSG:4326.
Describe the solution you’d like So it would help If there is a option, like ‘projection’ for Graticule Class.
PoC After studying Graticule class, I found it is not hard to parametrize the ‘draw projection’. I did write a PoC (the whole code is copied from v6.2.1., except for those marked “@@” ) and works well. To be short:
- parameterize for ‘draw projection’:
- This requires to alter not only ol/layer/Graticule, but also ol/geom/flat/geodesic (for meridian and parallel functions)
require the ‘projection’ option as a Projection and not a ProjectionLikeBecause my poc need getExtent() of ‘draw projeciton’ to set the limits (i.g., min/max lat/lon), and the information is not provided when registering proj4.If the option is ProjectinLike, ensure that itsextent
property is defined (see below https://github.com/openlayers/openlayers/issues/10913#issuecomment-612595474)
Demo web (Please zoom out to level 5~6 to see this is a “local” graticule)
Request I’m new to OL. For code coherence, It would better If any contributor can help review and code the idea.
Many thanks.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Define Projection (Data Management)—ArcGIS Pro
ArcGIS geoprocessing tool that overwrites the coordinate system information (map projection and datum) stored with a dataset.
Read more >Help adding projection and coordinate system to drawing
1. Open the Settings tab in the Toolspace · 2. Right-click on the DWG and "Edit drawing settings" · 3. Select a projection...
Read more >Specifying Coordinates - PGF/TikZ Manual
A coordinate is a position on the canvas on which your picture is drawn. TikZ uses a special syntax for specifying coordinates. Coordinates...
Read more >Introducing Coordinate Systems and Map Projections
Why should you care about coordinate systems and map projections? ... A map projection is an integral part of a projected coordinate system...
Read more >How to choose a projection
To help make this choice (repeating what was said above), look at the area of interest on a globe and see if its...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks! These are what I am looking for!
If you set up a projection using the constructor you must add it before it can be looked by code using getProjection (but getProjection takes projectionLike so you can pass the projection without having to add it)
Alternatively you could simply look up the projection already defined by registering proj4 and set an extent