sudo apt-get install tomcat7 tomcat7-admin
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
<filter> | |
<filter-name>CorsFilter</filter-name> | |
<filter-class>org.apache.catalina.filters.CorsFilter</filter-class> | |
<init-param> | |
<param-name>cors.allowed.origins</param-name> | |
<param-value>*</param-value> | |
</init-param> | |
<init-param> | |
<param-name>cors.allowed.methods</param-name> | |
<param-value>GET,POST,HEAD,OPTIONS,PUT</param-value> |
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
module.exports = { | |
config: { | |
// default font size in pixels for all tabs | |
fontSize: 12, | |
// font family with optional fallbacks | |
fontFamily: 'Menlo, "DejaVu Sans Mono", Consolas, "Lucida Console", monospace', | |
// terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk) | |
cursorColor: 'rgba(248,28,229,0.8)', |
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
There are a bunch of reasons why this is convoluted, mostly in building the URL to make the request: | |
1. You have to rely on an AJAX request, this example uses jQuery | |
2. To make a GetFeatureInfo request, you must provide a BBOX for a image, and the pixel coordinates for the part of the image that you want info from. A couple of squirrely lines of Leaflet code can give you that. | |
3. Output formats. The `info_format` parameter in the request. We don't know *a priori* which will be supported by a WMS that we might make a request to. See [Geoserver's docs](http://docs.geoserver.org/stable/en/user/services/wms/reference.html#getfeatureinfo) for what formats are available from Geoserver. That won't be the same from WMS to WMS, however. | |
4. WMS services return XML docs when there's a mistake in the request or in processing. This sends an HTTP 200, which jQuery doesn't think is an error. | |
5. added a php proxy and 2 new options (CORS workaround) |
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
Download Google Drive files with WGET | |
Example Google Drive download link: | |
https://docs.google.com/open?id=[ID] | |
To download the file with WGET you need to use this link: | |
https://googledrive.com/host/[ID] | |
Example WGET command: |