-
Notifications
You must be signed in to change notification settings - Fork 770
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
Graticule control improvements #1375
Merged
Merged
Changes from 6 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
0b8a029
Add functions for createing geodesic lines
ahocevar 1d5cd8e
Rewrite the graticule control
ahocevar 08d8c5a
Update examples to use projection default options
ahocevar 41ae609
Mention graticule related changes in release notes.
ahocevar 68a191c
Fixing compiler issues
ahocevar 0adcfa2
Additional release notes and documentation.
ahocevar 6c738e2
Simplify projection configuration
ahocevar ea879e7
Fix typos
ahocevar 210ba30
Fix clamping of lon and lat
ahocevar a0b1e69
Clearer release notes
ahocevar 1a7ddfe
Simplify projection configuration
ahocevar 4da4fee
Fixing typos
ahocevar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,14 @@ | |
<script src="http://svn.osgeo.org/metacrs/proj4js/trunk/lib/proj4js-compressed.js"></script> | ||
<script type="text/javascript"> | ||
Proj4js.defs["EPSG:42304"]="+title=Atlas of Canada, LCC +proj=lcc +lat_1=49 +lat_2=77 +lat_0=49 +lon_0=-95 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"; | ||
|
||
OpenLayers.Projection.defaults["EPSG:42304"] = { | ||
maxExtent: [-2200000,-712631,3072800,3840000], | ||
worldExtent: [-180, 30, 180, 90], | ||
units: 'm' | ||
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. also how come units need to be repeated in defaults, when they are part of the projection object itself? 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 need to. Removing. |
||
} | ||
// Allow date line wrapping for 10 worlds by using -1800 and 1800 | ||
// instead of -180 and 180. | ||
OpenLayers.Projection.defaults["EPSG:4326"].worldExtent = [-1800, -90, 1800, 90]; | ||
var graticuleCtl1, graticuleCtl2; | ||
var map1, map2; | ||
function init(){ | ||
|
@@ -56,7 +63,6 @@ | |
}; | ||
|
||
function initProjected(){ | ||
var extent = new OpenLayers.Bounds(-2200000,-712631,3072800,3840000); | ||
graticuleCtl2 = new OpenLayers.Control.Graticule({ | ||
labelled: true, | ||
targetSize: 200 | ||
|
@@ -68,10 +74,6 @@ | |
new OpenLayers.Control.PanZoomBar(), | ||
new OpenLayers.Control.Navigation() | ||
], | ||
//scales: tempScales, | ||
maxExtent: extent, | ||
maxResolution: 50000, | ||
units: 'm', | ||
projection: 'EPSG:42304' | ||
}; | ||
map2 = new OpenLayers.Map('map2', mapOptions); | ||
|
@@ -85,7 +87,7 @@ | |
}); | ||
|
||
map2.addLayers([dm_wms]); | ||
if (!map2.getCenter()) map2.zoomToExtent(extent); | ||
map2.setCenter([436400, 1564045], 1); | ||
} | ||
</script> | ||
</head> | ||
|
@@ -114,3 +116,4 @@ <h1 id="title">Graticule Example</h1> | |
</ul> | ||
</body> | ||
</html> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I don't know much about EPSG:42304 but can you explain how you get to the value of 30 here?
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.
A leftover from playing around. I changed it to 0, which is kind of obvious for polar projections.