-
Notifications
You must be signed in to change notification settings - Fork 75
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
Update examples. #743
Update examples. #743
Conversation
Tweak a few examples to fix some inconsistencies and errors. The goal is for every example to start in an interesting spot, and, moreover, for the thumbnail of the example to be representative of the example. Added an optional `thumbquery` parameter to example.json files. If present, this should be added to the base url when generating the thumbnail for the example. Adjusted the zoom and center of several examples to start in more interesting locations. Fixed some style issues. If a heatmap was panned before it was ready, it could throw an error. If a reprojection's viewport corners were ill-defined in the projection, the map would fail to draw. For the WMS and SLD examples, switch the URL used for the geoserver to https. This works -- the http server no longer does. For the SLD example, add controls to allow setting the base url, layer name, and projection. Clean up some of the pug code. Update the thumbnail to match what the default settings show.
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.
LGTM, just has a question out of curiosity. Was intimidated by the number of files changes but the review was easy 😄
@@ -12,40 +12,36 @@ var layer = { | |||
projection: 'EPSG:3785' | |||
}; | |||
|
|||
var baseUrl = 'https://demo.boundlessgeo.com/geoserver/ows'; |
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.
+1
if (pt === undefined) { | ||
var size = map.size(); | ||
pt = {x: size.width / 2, y: size.height / 2}; | ||
} | ||
/* displayToGcs can fail under certain projections. If this happens, |
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.
how can we replicate this behavior in our current version?
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.
just curious but agree on the statement
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.
In the reprojection example, choose a projection that curves at the edges, (ESRI:53009 or any Mollweide will work). Zoom out. If you zoomed out far enough, this code path is triggered.
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.
Got it, thanks.
Tweak a few examples to fix some inconsistencies and errors. The goal is for every example to start in an interesting spot, and, moreover, for the thumbnail of the example to be representative of the example.
Added an optional
thumbquery
parameter to example.json files. If present, this should be added to the base url when generating the thumbnail for the example.Adjusted the zoom and center of several examples to start in more interesting locations.
Fixed some style issues.
If a heatmap was panned before it was ready, it could throw an error.
If a reprojection's viewport corners were ill-defined in the projection, the map would fail to draw.
For the WMS and SLD examples, switch the URL used for the geoserver to https. This works -- the http server no longer does (this resolves issue #690).
For the SLD example, add controls to allow setting the base url, layer name, and projection. Clean up some of the pug code. Update the thumbnail to match what the default settings show.