├── views ├── map.php ├── static-maps.php ├── layout.php └── index.php ├── .gitignore ├── public ├── map-images │ ├── fb.png │ ├── google.png │ ├── dot-large-blue.png │ ├── dot-large-gray.png │ ├── dot-large-green.png │ ├── dot-large-pink.png │ ├── dot-large-red.png │ ├── dot-small-blue.png │ ├── dot-small-gray.png │ ├── dot-small-green.png │ ├── dot-small-pink.png │ ├── dot-small-red.png │ ├── large-gray-user.png │ ├── large-red-blank.png │ ├── powered-by-esri.png │ ├── powered-by-esri.psd │ ├── small-gray-user.png │ ├── small-pink-user.png │ ├── small-red-blank.png │ ├── dot-large-orange.png │ ├── dot-large-purple.png │ ├── dot-large-yellow.png │ ├── dot-small-orange.png │ ├── dot-small-purple.png │ ├── dot-small-yellow.png │ ├── large-blue-blank.png │ ├── large-blue-cutout.png │ ├── large-gray-blank.png │ ├── large-gray-cutout.png │ ├── large-green-blank.png │ ├── large-pink-blank.png │ ├── large-pink-cutout.png │ ├── large-red-cutout.png │ ├── large-yellow-user.png │ ├── small-blue-blank.png │ ├── small-blue-cutout.png │ ├── small-gray-blank.png │ ├── small-gray-cutout.png │ ├── small-green-blank.png │ ├── small-green-user.png │ ├── small-pink-blank.png │ ├── small-pink-cutout.png │ ├── small-red-cutout.png │ ├── small-yellow-user.png │ ├── large-green-cutout.png │ ├── large-orange-blank.png │ ├── large-orange-cutout.png │ ├── large-purple-blank.png │ ├── large-purple-cutout.png │ ├── large-yellow-blank.png │ ├── large-yellow-cutout.png │ ├── large-yellow-message.png │ ├── mapbox-attribution.png │ ├── mapbox-attribution.psd │ ├── small-gray-message.png │ ├── small-green-cutout.png │ ├── small-orange-blank.png │ ├── small-orange-cutout.png │ ├── small-purple-blank.png │ ├── small-purple-cutout.png │ ├── small-yellow-blank.png │ └── small-yellow-cutout.png ├── assets │ ├── sample-map.png │ ├── font-awesome-4.4.0 │ │ ├── fonts │ │ │ ├── FontAwesome.otf │ │ │ ├── fontawesome-webfont.eot │ │ │ ├── fontawesome-webfont.ttf │ │ │ ├── fontawesome-webfont.woff │ │ │ └── fontawesome-webfont.woff2 │ │ ├── less │ │ │ ├── fixed-width.less │ │ │ ├── larger.less │ │ │ ├── list.less │ │ │ ├── core.less │ │ │ ├── font-awesome.less │ │ │ ├── stacked.less │ │ │ ├── bordered-pulled.less │ │ │ ├── rotated-flipped.less │ │ │ ├── path.less │ │ │ ├── animated.less │ │ │ └── mixins.less │ │ ├── scss │ │ │ ├── _fixed-width.scss │ │ │ ├── _larger.scss │ │ │ ├── _list.scss │ │ │ ├── font-awesome.scss │ │ │ ├── _core.scss │ │ │ ├── _stacked.scss │ │ │ ├── _bordered-pulled.scss │ │ │ ├── _rotated-flipped.scss │ │ │ ├── _path.scss │ │ │ ├── _animated.scss │ │ │ └── _mixins.scss │ │ └── HELP-US-OUT.txt │ ├── pure-0.6.0 │ │ ├── bower.json │ │ ├── menus-horizontal-min.css │ │ ├── buttons-core-min.css │ │ ├── menus-core-min.css │ │ ├── menus-scrollable-min.css │ │ ├── menus-dropdown-min.css │ │ ├── menus-horizontal.css │ │ ├── grids-core-min.css │ │ ├── menus-skin-min.css │ │ ├── buttons-core.css │ │ ├── menus-core.css │ │ ├── menus-scrollable.css │ │ ├── tables-min.css │ │ ├── menus-dropdown.css │ │ ├── menus-skin.css │ │ ├── buttons-min.css │ │ ├── tables.css │ │ ├── grids-units-min.css │ │ ├── base-min.css │ │ ├── menus-min.css │ │ ├── grids-core.css │ │ ├── base-context-min.css │ │ ├── grids-min.css │ │ ├── LICENSE.md │ │ ├── buttons.css │ │ ├── grids-units.css │ │ ├── menus.css │ │ ├── README.md │ │ ├── forms-nr-min.css │ │ ├── grids-responsive-old-ie.css │ │ ├── grids-responsive-old-ie-min.css │ │ ├── grids.css │ │ ├── forms-min.css │ │ ├── grids-responsive-min.css │ │ ├── forms-nr.css │ │ ├── base.css │ │ └── base-context.css │ └── styles.css ├── index.php └── .htaccess ├── CONTRIBUTING.md ├── composer.json ├── controllers ├── main.php ├── weather.php ├── timezone.php └── geocode.php ├── p3k ├── Airports.php ├── timezone │ └── Result.php ├── geocode │ └── Result.php ├── geo │ └── WebMercator.php ├── Geocoder.php └── Weather.php ├── data ├── airports-csv-to-json.php ├── airports-csv-compact.php └── static-maps.md ├── lib └── helpers.php ├── README.md ├── composer.lock └── LICENSE /views/map.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | vendor/ 3 | lib/config.php 4 | data/airports.csv 5 | data/apikeys.txt 6 | -------------------------------------------------------------------------------- /public/map-images/fb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/fb.png -------------------------------------------------------------------------------- /public/assets/sample-map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/assets/sample-map.png -------------------------------------------------------------------------------- /public/map-images/google.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/google.png -------------------------------------------------------------------------------- /public/map-images/dot-large-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/dot-large-blue.png -------------------------------------------------------------------------------- /public/map-images/dot-large-gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/dot-large-gray.png -------------------------------------------------------------------------------- /public/map-images/dot-large-green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/dot-large-green.png -------------------------------------------------------------------------------- /public/map-images/dot-large-pink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/dot-large-pink.png -------------------------------------------------------------------------------- /public/map-images/dot-large-red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/dot-large-red.png -------------------------------------------------------------------------------- /public/map-images/dot-small-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/dot-small-blue.png -------------------------------------------------------------------------------- /public/map-images/dot-small-gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/dot-small-gray.png -------------------------------------------------------------------------------- /public/map-images/dot-small-green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/dot-small-green.png -------------------------------------------------------------------------------- /public/map-images/dot-small-pink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/dot-small-pink.png -------------------------------------------------------------------------------- /public/map-images/dot-small-red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/dot-small-red.png -------------------------------------------------------------------------------- /public/map-images/large-gray-user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/large-gray-user.png -------------------------------------------------------------------------------- /public/map-images/large-red-blank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/large-red-blank.png -------------------------------------------------------------------------------- /public/map-images/powered-by-esri.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/powered-by-esri.png -------------------------------------------------------------------------------- /public/map-images/powered-by-esri.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/powered-by-esri.psd -------------------------------------------------------------------------------- /public/map-images/small-gray-user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/small-gray-user.png -------------------------------------------------------------------------------- /public/map-images/small-pink-user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/small-pink-user.png -------------------------------------------------------------------------------- /public/map-images/small-red-blank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/small-red-blank.png -------------------------------------------------------------------------------- /public/map-images/dot-large-orange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/dot-large-orange.png -------------------------------------------------------------------------------- /public/map-images/dot-large-purple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/dot-large-purple.png -------------------------------------------------------------------------------- /public/map-images/dot-large-yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/dot-large-yellow.png -------------------------------------------------------------------------------- /public/map-images/dot-small-orange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/dot-small-orange.png -------------------------------------------------------------------------------- /public/map-images/dot-small-purple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/dot-small-purple.png -------------------------------------------------------------------------------- /public/map-images/dot-small-yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/dot-small-yellow.png -------------------------------------------------------------------------------- /public/map-images/large-blue-blank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/large-blue-blank.png -------------------------------------------------------------------------------- /public/map-images/large-blue-cutout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/large-blue-cutout.png -------------------------------------------------------------------------------- /public/map-images/large-gray-blank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/large-gray-blank.png -------------------------------------------------------------------------------- /public/map-images/large-gray-cutout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/large-gray-cutout.png -------------------------------------------------------------------------------- /public/map-images/large-green-blank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/large-green-blank.png -------------------------------------------------------------------------------- /public/map-images/large-pink-blank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/large-pink-blank.png -------------------------------------------------------------------------------- /public/map-images/large-pink-cutout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/large-pink-cutout.png -------------------------------------------------------------------------------- /public/map-images/large-red-cutout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/large-red-cutout.png -------------------------------------------------------------------------------- /public/map-images/large-yellow-user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/large-yellow-user.png -------------------------------------------------------------------------------- /public/map-images/small-blue-blank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/small-blue-blank.png -------------------------------------------------------------------------------- /public/map-images/small-blue-cutout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/small-blue-cutout.png -------------------------------------------------------------------------------- /public/map-images/small-gray-blank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/small-gray-blank.png -------------------------------------------------------------------------------- /public/map-images/small-gray-cutout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/small-gray-cutout.png -------------------------------------------------------------------------------- /public/map-images/small-green-blank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/small-green-blank.png -------------------------------------------------------------------------------- /public/map-images/small-green-user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/small-green-user.png -------------------------------------------------------------------------------- /public/map-images/small-pink-blank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/small-pink-blank.png -------------------------------------------------------------------------------- /public/map-images/small-pink-cutout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/small-pink-cutout.png -------------------------------------------------------------------------------- /public/map-images/small-red-cutout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/small-red-cutout.png -------------------------------------------------------------------------------- /public/map-images/small-yellow-user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/small-yellow-user.png -------------------------------------------------------------------------------- /public/map-images/large-green-cutout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/large-green-cutout.png -------------------------------------------------------------------------------- /public/map-images/large-orange-blank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/large-orange-blank.png -------------------------------------------------------------------------------- /public/map-images/large-orange-cutout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/large-orange-cutout.png -------------------------------------------------------------------------------- /public/map-images/large-purple-blank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/large-purple-blank.png -------------------------------------------------------------------------------- /public/map-images/large-purple-cutout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/large-purple-cutout.png -------------------------------------------------------------------------------- /public/map-images/large-yellow-blank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/large-yellow-blank.png -------------------------------------------------------------------------------- /public/map-images/large-yellow-cutout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/large-yellow-cutout.png -------------------------------------------------------------------------------- /public/map-images/large-yellow-message.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/large-yellow-message.png -------------------------------------------------------------------------------- /public/map-images/mapbox-attribution.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/mapbox-attribution.png -------------------------------------------------------------------------------- /public/map-images/mapbox-attribution.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/mapbox-attribution.psd -------------------------------------------------------------------------------- /public/map-images/small-gray-message.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/small-gray-message.png -------------------------------------------------------------------------------- /public/map-images/small-green-cutout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/small-green-cutout.png -------------------------------------------------------------------------------- /public/map-images/small-orange-blank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/small-orange-blank.png -------------------------------------------------------------------------------- /public/map-images/small-orange-cutout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/small-orange-cutout.png -------------------------------------------------------------------------------- /public/map-images/small-purple-blank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/small-purple-blank.png -------------------------------------------------------------------------------- /public/map-images/small-purple-cutout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/small-purple-cutout.png -------------------------------------------------------------------------------- /public/map-images/small-yellow-blank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/small-yellow-blank.png -------------------------------------------------------------------------------- /public/map-images/small-yellow-cutout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/map-images/small-yellow-cutout.png -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | By submitting code to this project, you agree to irrevocably release it under the same license as this project. See README.md for more details. -------------------------------------------------------------------------------- /public/assets/font-awesome-4.4.0/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/assets/font-awesome-4.4.0/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /public/assets/font-awesome-4.4.0/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/assets/font-awesome-4.4.0/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /public/assets/font-awesome-4.4.0/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/assets/font-awesome-4.4.0/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /public/assets/font-awesome-4.4.0/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/assets/font-awesome-4.4.0/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /public/assets/font-awesome-4.4.0/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/Atlas/main/public/assets/font-awesome-4.4.0/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /public/assets/font-awesome-4.4.0/less/fixed-width.less: -------------------------------------------------------------------------------- 1 | // Fixed Width Icons 2 | // ------------------------- 3 | .@{fa-css-prefix}-fw { 4 | width: (18em / 14); 5 | text-align: center; 6 | } 7 | -------------------------------------------------------------------------------- /public/assets/font-awesome-4.4.0/scss/_fixed-width.scss: -------------------------------------------------------------------------------- 1 | // Fixed Width Icons 2 | // ------------------------- 3 | .#{$fa-css-prefix}-fw { 4 | width: (18em / 14); 5 | text-align: center; 6 | } 7 | -------------------------------------------------------------------------------- /public/assets/pure-0.6.0/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pure", 3 | "description": "Use Pure's ridiculously tiny CSS to start any web project.", 4 | "version": "0.6.0", 5 | "main": "pure.css", 6 | "devDependencies": { 7 | "normalize-css": "^3.0" 8 | } 9 | } -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | run(); 13 | -------------------------------------------------------------------------------- /public/assets/font-awesome-4.4.0/HELP-US-OUT.txt: -------------------------------------------------------------------------------- 1 | I hope you love Font Awesome. If you've found it useful, please do me a favor and check out my latest project, 2 | Fonticons (https://fonticons.com). It makes it easy to put the perfect icons on your website. Choose from our awesome, 3 | comprehensive icon sets or copy and paste your own. 4 | 5 | Please. Check it out. 6 | 7 | -Dave Gandy 8 | -------------------------------------------------------------------------------- /views/static-maps.php: -------------------------------------------------------------------------------- 1 |
2 |

Atlas Static Maps

3 |

Atlas Static Maps is an API for generating map images with markers or other overlays

4 |
5 | 6 | 7 |
8 | 9 | 15 | 16 |
17 | -------------------------------------------------------------------------------- /public/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews 4 | 5 | 6 | RewriteEngine On 7 | 8 | # Redirect Trailing Slashes... 9 | RewriteRule ^(.*)/$ /$1 [L,R=301] 10 | 11 | # Handle Front Controller... 12 | RewriteCond %{REQUEST_FILENAME} !-d 13 | RewriteCond %{REQUEST_FILENAME} !-f 14 | RewriteRule ^ index.php [L] 15 | 16 | -------------------------------------------------------------------------------- /public/assets/font-awesome-4.4.0/less/larger.less: -------------------------------------------------------------------------------- 1 | // Icon Sizes 2 | // ------------------------- 3 | 4 | /* makes the font 33% larger relative to the icon container */ 5 | .@{fa-css-prefix}-lg { 6 | font-size: (4em / 3); 7 | line-height: (3em / 4); 8 | vertical-align: -15%; 9 | } 10 | .@{fa-css-prefix}-2x { font-size: 2em; } 11 | .@{fa-css-prefix}-3x { font-size: 3em; } 12 | .@{fa-css-prefix}-4x { font-size: 4em; } 13 | .@{fa-css-prefix}-5x { font-size: 5em; } 14 | -------------------------------------------------------------------------------- /public/assets/font-awesome-4.4.0/scss/_larger.scss: -------------------------------------------------------------------------------- 1 | // Icon Sizes 2 | // ------------------------- 3 | 4 | /* makes the font 33% larger relative to the icon container */ 5 | .#{$fa-css-prefix}-lg { 6 | font-size: (4em / 3); 7 | line-height: (3em / 4); 8 | vertical-align: -15%; 9 | } 10 | .#{$fa-css-prefix}-2x { font-size: 2em; } 11 | .#{$fa-css-prefix}-3x { font-size: 3em; } 12 | .#{$fa-css-prefix}-4x { font-size: 4em; } 13 | .#{$fa-css-prefix}-5x { font-size: 5em; } 14 | -------------------------------------------------------------------------------- /public/assets/font-awesome-4.4.0/less/list.less: -------------------------------------------------------------------------------- 1 | // List Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-ul { 5 | padding-left: 0; 6 | margin-left: @fa-li-width; 7 | list-style-type: none; 8 | > li { position: relative; } 9 | } 10 | .@{fa-css-prefix}-li { 11 | position: absolute; 12 | left: -@fa-li-width; 13 | width: @fa-li-width; 14 | top: (2em / 14); 15 | text-align: center; 16 | &.@{fa-css-prefix}-lg { 17 | left: (-@fa-li-width + (4em / 14)); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /public/assets/font-awesome-4.4.0/scss/_list.scss: -------------------------------------------------------------------------------- 1 | // List Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-ul { 5 | padding-left: 0; 6 | margin-left: $fa-li-width; 7 | list-style-type: none; 8 | > li { position: relative; } 9 | } 10 | .#{$fa-css-prefix}-li { 11 | position: absolute; 12 | left: -$fa-li-width; 13 | width: $fa-li-width; 14 | top: (2em / 14); 15 | text-align: center; 16 | &.#{$fa-css-prefix}-lg { 17 | left: -$fa-li-width + (4em / 14); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /public/assets/pure-0.6.0/menus-horizontal-min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Pure v0.6.0 3 | Copyright 2014 Yahoo! Inc. All rights reserved. 4 | Licensed under the BSD License. 5 | https://github.com/yahoo/pure/blob/master/LICENSE.md 6 | */ 7 | .pure-menu-horizontal{width:100%;white-space:nowrap}.pure-menu-horizontal .pure-menu-list{display:inline-block}.pure-menu-horizontal .pure-menu-item,.pure-menu-horizontal .pure-menu-heading,.pure-menu-horizontal .pure-menu-separator{display:inline-block;*display:inline;zoom:1;vertical-align:middle} -------------------------------------------------------------------------------- /public/assets/font-awesome-4.4.0/scss/font-awesome.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.4.0 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */ 5 | 6 | @import "variables"; 7 | @import "mixins"; 8 | @import "path"; 9 | @import "core"; 10 | @import "larger"; 11 | @import "fixed-width"; 12 | @import "list"; 13 | @import "bordered-pulled"; 14 | @import "animated"; 15 | @import "rotated-flipped"; 16 | @import "stacked"; 17 | @import "icons"; 18 | -------------------------------------------------------------------------------- /public/assets/font-awesome-4.4.0/less/core.less: -------------------------------------------------------------------------------- 1 | // Base Class Definition 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix} { 5 | display: inline-block; 6 | font: normal normal normal @fa-font-size-base/@fa-line-height-base FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /public/assets/font-awesome-4.4.0/scss/_core.scss: -------------------------------------------------------------------------------- 1 | // Base Class Definition 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix} { 5 | display: inline-block; 6 | font: normal normal normal #{$fa-font-size-base}/#{$fa-line-height-base} FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /public/assets/pure-0.6.0/buttons-core-min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Pure v0.6.0 3 | Copyright 2014 Yahoo! Inc. All rights reserved. 4 | Licensed under the BSD License. 5 | https://github.com/yahoo/pure/blob/master/LICENSE.md 6 | */ 7 | .pure-button{display:inline-block;zoom:1;line-height:normal;white-space:nowrap;vertical-align:middle;text-align:center;cursor:pointer;-webkit-user-drag:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.pure-button::-moz-focus-inner{padding:0;border:0} -------------------------------------------------------------------------------- /public/assets/pure-0.6.0/menus-core-min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Pure v0.6.0 3 | Copyright 2014 Yahoo! Inc. All rights reserved. 4 | Licensed under the BSD License. 5 | https://github.com/yahoo/pure/blob/master/LICENSE.md 6 | */ 7 | .pure-menu{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.pure-menu-fixed{position:fixed;left:0;top:0;z-index:3}.pure-menu-list,.pure-menu-item{position:relative}.pure-menu-list{list-style:none;margin:0;padding:0}.pure-menu-item{padding:0;margin:0;height:100%}.pure-menu-link,.pure-menu-heading{display:block;text-decoration:none;white-space:nowrap} -------------------------------------------------------------------------------- /public/assets/font-awesome-4.4.0/less/font-awesome.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.4.0 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */ 5 | 6 | @import "variables.less"; 7 | @import "mixins.less"; 8 | @import "path.less"; 9 | @import "core.less"; 10 | @import "larger.less"; 11 | @import "fixed-width.less"; 12 | @import "list.less"; 13 | @import "bordered-pulled.less"; 14 | @import "animated.less"; 15 | @import "rotated-flipped.less"; 16 | @import "stacked.less"; 17 | @import "icons.less"; 18 | -------------------------------------------------------------------------------- /public/assets/font-awesome-4.4.0/less/stacked.less: -------------------------------------------------------------------------------- 1 | // Stacked Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-stack { 5 | position: relative; 6 | display: inline-block; 7 | width: 2em; 8 | height: 2em; 9 | line-height: 2em; 10 | vertical-align: middle; 11 | } 12 | .@{fa-css-prefix}-stack-1x, .@{fa-css-prefix}-stack-2x { 13 | position: absolute; 14 | left: 0; 15 | width: 100%; 16 | text-align: center; 17 | } 18 | .@{fa-css-prefix}-stack-1x { line-height: inherit; } 19 | .@{fa-css-prefix}-stack-2x { font-size: 2em; } 20 | .@{fa-css-prefix}-inverse { color: @fa-inverse; } 21 | -------------------------------------------------------------------------------- /public/assets/font-awesome-4.4.0/scss/_stacked.scss: -------------------------------------------------------------------------------- 1 | // Stacked Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-stack { 5 | position: relative; 6 | display: inline-block; 7 | width: 2em; 8 | height: 2em; 9 | line-height: 2em; 10 | vertical-align: middle; 11 | } 12 | .#{$fa-css-prefix}-stack-1x, .#{$fa-css-prefix}-stack-2x { 13 | position: absolute; 14 | left: 0; 15 | width: 100%; 16 | text-align: center; 17 | } 18 | .#{$fa-css-prefix}-stack-1x { line-height: inherit; } 19 | .#{$fa-css-prefix}-stack-2x { font-size: 2em; } 20 | .#{$fa-css-prefix}-inverse { color: $fa-inverse; } 21 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "p3k/atlas", 3 | "description": "Atlas", 4 | "keywords": ["p3k", "indieweb", "maps", "geocoding", "timezone"], 5 | "license": "Apache 2.0", 6 | "type": "project", 7 | "require": { 8 | "saltybeagle/savant3": "dev-master", 9 | "p3k/slim-savant": ">=0.1.0", 10 | "slim/slim": "^2.6", 11 | "p3k/timezone": "*", 12 | "michelf/php-markdown": "^1.9" 13 | }, 14 | "autoload": { 15 | "psr-4": { 16 | "p3k\\": "p3k/" 17 | }, 18 | "files": [ 19 | "lib/helpers.php", 20 | "p3k/geo/WebMercator.php", 21 | "p3k/geo/StaticMap.php" 22 | ] 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /public/assets/pure-0.6.0/menus-scrollable-min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Pure v0.6.0 3 | Copyright 2014 Yahoo! Inc. All rights reserved. 4 | Licensed under the BSD License. 5 | https://github.com/yahoo/pure/blob/master/LICENSE.md 6 | */ 7 | .pure-menu-scrollable{overflow-y:scroll;overflow-x:hidden}.pure-menu-scrollable .pure-menu-list{display:block}.pure-menu-horizontal.pure-menu-scrollable .pure-menu-list{display:inline-block}.pure-menu-horizontal.pure-menu-scrollable{white-space:nowrap;overflow-y:hidden;overflow-x:auto;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;padding:.5em 0}.pure-menu-horizontal.pure-menu-scrollable::-webkit-scrollbar{display:none} -------------------------------------------------------------------------------- /controllers/main.php: -------------------------------------------------------------------------------- 1 | get('/', function() use($app) { 5 | return Savant\render('index'); 6 | }); 7 | 8 | $app->get('/static-maps', function() use($app) { 9 | return Savant\render('static-maps'); 10 | }); 11 | 12 | $app->get('/map', function() use($app) { 13 | return Savant\render('map'); 14 | }); 15 | 16 | $app->map('/map/img', function() use($app) { 17 | $params = $app->request()->params(); 18 | $app->response['Content-type'] = 'image/png'; 19 | $assetPath = dirname(__FILE__) . '/../public/map-images'; 20 | $map = p3k\geo\StaticMap\generate($params, null, $assetPath, is_authenticated($params)); 21 | })->via('GET','POST'); 22 | -------------------------------------------------------------------------------- /p3k/Airports.php: -------------------------------------------------------------------------------- 1 | $code, 21 | 'latitude' => $line[1], 22 | 'longitude' => $line[2], 23 | 'name' => $line[3], 24 | ]; 25 | } 26 | } 27 | 28 | return $airport; 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /public/assets/pure-0.6.0/menus-dropdown-min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Pure v0.6.0 3 | Copyright 2014 Yahoo! Inc. All rights reserved. 4 | Licensed under the BSD License. 5 | https://github.com/yahoo/pure/blob/master/LICENSE.md 6 | */ 7 | .pure-menu-item .pure-menu-item{display:block}.pure-menu-children{display:none;position:absolute;left:100%;top:0;margin:0;padding:0;z-index:3}.pure-menu-horizontal .pure-menu-children{left:0;top:auto;width:inherit}.pure-menu-allow-hover:hover>.pure-menu-children,.pure-menu-active>.pure-menu-children{display:block;position:absolute}.pure-menu-has-children>.pure-menu-link:after{padding-left:.5em;content:"\25B8";font-size:small}.pure-menu-horizontal .pure-menu-has-children>.pure-menu-link:after{content:"\25BE"} -------------------------------------------------------------------------------- /public/assets/font-awesome-4.4.0/less/bordered-pulled.less: -------------------------------------------------------------------------------- 1 | // Bordered & Pulled 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-border { 5 | padding: .2em .25em .15em; 6 | border: solid .08em @fa-border-color; 7 | border-radius: .1em; 8 | } 9 | 10 | .@{fa-css-prefix}-pull-left { float: left; } 11 | .@{fa-css-prefix}-pull-right { float: right; } 12 | 13 | .@{fa-css-prefix} { 14 | &.@{fa-css-prefix}-pull-left { margin-right: .3em; } 15 | &.@{fa-css-prefix}-pull-right { margin-left: .3em; } 16 | } 17 | 18 | /* Deprecated as of 4.4.0 */ 19 | .pull-right { float: right; } 20 | .pull-left { float: left; } 21 | 22 | .@{fa-css-prefix} { 23 | &.pull-left { margin-right: .3em; } 24 | &.pull-right { margin-left: .3em; } 25 | } 26 | -------------------------------------------------------------------------------- /public/assets/pure-0.6.0/menus-horizontal.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Pure v0.6.0 3 | Copyright 2014 Yahoo! Inc. All rights reserved. 4 | Licensed under the BSD License. 5 | https://github.com/yahoo/pure/blob/master/LICENSE.md 6 | */ 7 | /* HORIZONTAL MENU */ 8 | .pure-menu-horizontal { 9 | width: 100%; 10 | white-space: nowrap; 11 | } 12 | 13 | .pure-menu-horizontal .pure-menu-list { 14 | display: inline-block; 15 | } 16 | 17 | /* Initial menus should be inline-block so that they are horizontal */ 18 | .pure-menu-horizontal .pure-menu-item, 19 | .pure-menu-horizontal .pure-menu-heading, 20 | .pure-menu-horizontal .pure-menu-separator { 21 | display: inline-block; 22 | *display: inline; 23 | zoom: 1; 24 | vertical-align: middle; 25 | } 26 | -------------------------------------------------------------------------------- /public/assets/font-awesome-4.4.0/scss/_bordered-pulled.scss: -------------------------------------------------------------------------------- 1 | // Bordered & Pulled 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-border { 5 | padding: .2em .25em .15em; 6 | border: solid .08em $fa-border-color; 7 | border-radius: .1em; 8 | } 9 | 10 | .#{$fa-css-prefix}-pull-left { float: left; } 11 | .#{$fa-css-prefix}-pull-right { float: right; } 12 | 13 | .#{$fa-css-prefix} { 14 | &.#{$fa-css-prefix}-pull-left { margin-right: .3em; } 15 | &.#{$fa-css-prefix}-pull-right { margin-left: .3em; } 16 | } 17 | 18 | /* Deprecated as of 4.4.0 */ 19 | .pull-right { float: right; } 20 | .pull-left { float: left; } 21 | 22 | .#{$fa-css-prefix} { 23 | &.pull-left { margin-right: .3em; } 24 | &.pull-right { margin-left: .3em; } 25 | } 26 | -------------------------------------------------------------------------------- /public/assets/font-awesome-4.4.0/less/rotated-flipped.less: -------------------------------------------------------------------------------- 1 | // Rotated & Flipped Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-rotate-90 { .fa-icon-rotate(90deg, 1); } 5 | .@{fa-css-prefix}-rotate-180 { .fa-icon-rotate(180deg, 2); } 6 | .@{fa-css-prefix}-rotate-270 { .fa-icon-rotate(270deg, 3); } 7 | 8 | .@{fa-css-prefix}-flip-horizontal { .fa-icon-flip(-1, 1, 0); } 9 | .@{fa-css-prefix}-flip-vertical { .fa-icon-flip(1, -1, 2); } 10 | 11 | // Hook for IE8-9 12 | // ------------------------- 13 | 14 | :root .@{fa-css-prefix}-rotate-90, 15 | :root .@{fa-css-prefix}-rotate-180, 16 | :root .@{fa-css-prefix}-rotate-270, 17 | :root .@{fa-css-prefix}-flip-horizontal, 18 | :root .@{fa-css-prefix}-flip-vertical { 19 | filter: none; 20 | } 21 | -------------------------------------------------------------------------------- /public/assets/pure-0.6.0/grids-core-min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Pure v0.6.0 3 | Copyright 2014 Yahoo! Inc. All rights reserved. 4 | Licensed under the BSD License. 5 | https://github.com/yahoo/pure/blob/master/LICENSE.md 6 | */ 7 | .pure-g{letter-spacing:-.31em;*letter-spacing:normal;*word-spacing:-.43em;text-rendering:optimizespeed;font-family:FreeSans,Arimo,"Droid Sans",Helvetica,Arial,sans-serif;display:-webkit-flex;-webkit-flex-flow:row wrap;display:-ms-flexbox;-ms-flex-flow:row wrap;-ms-align-content:flex-start;-webkit-align-content:flex-start;align-content:flex-start}.opera-only :-o-prefocus,.pure-g{word-spacing:-.43em}.pure-u{display:inline-block;*display:inline;zoom:1;letter-spacing:normal;word-spacing:normal;vertical-align:top;text-rendering:auto}.pure-g [class *="pure-u"]{font-family:sans-serif} -------------------------------------------------------------------------------- /views/layout.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Atlas 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | fetch($this->page . '.php') ?> 14 | 15 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /public/assets/font-awesome-4.4.0/scss/_rotated-flipped.scss: -------------------------------------------------------------------------------- 1 | // Rotated & Flipped Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-rotate-90 { @include fa-icon-rotate(90deg, 1); } 5 | .#{$fa-css-prefix}-rotate-180 { @include fa-icon-rotate(180deg, 2); } 6 | .#{$fa-css-prefix}-rotate-270 { @include fa-icon-rotate(270deg, 3); } 7 | 8 | .#{$fa-css-prefix}-flip-horizontal { @include fa-icon-flip(-1, 1, 0); } 9 | .#{$fa-css-prefix}-flip-vertical { @include fa-icon-flip(1, -1, 2); } 10 | 11 | // Hook for IE8-9 12 | // ------------------------- 13 | 14 | :root .#{$fa-css-prefix}-rotate-90, 15 | :root .#{$fa-css-prefix}-rotate-180, 16 | :root .#{$fa-css-prefix}-rotate-270, 17 | :root .#{$fa-css-prefix}-flip-horizontal, 18 | :root .#{$fa-css-prefix}-flip-vertical { 19 | filter: none; 20 | } 21 | -------------------------------------------------------------------------------- /public/assets/styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: #fff; 3 | } 4 | 5 | .page, footer, header { 6 | max-width: 600px; 7 | margin: 0 auto; 8 | padding: 0 20px; 9 | } 10 | 11 | header { 12 | border-bottom: 4px #ccc solid; 13 | } 14 | 15 | header h1 { 16 | text-align: center; 17 | font-weight: 100; 18 | font-size: 55px; 19 | margin: 60px 0 20px 0; 20 | } 21 | 22 | footer { 23 | margin-top: 40px; 24 | font-size: 12px; 25 | border-top: 4px #ccc solid; 26 | } 27 | footer .right { 28 | float: right; 29 | } 30 | 31 | .page h2 { 32 | border-bottom: 1px #ccc solid; 33 | } 34 | 35 | a { 36 | color: #08c; 37 | } 38 | a:hover { 39 | color: #005580; 40 | } 41 | 42 | h2 i.fa { 43 | font-size: 42px; 44 | } 45 | 46 | .docs li { 47 | line-height: 1.2em; 48 | margin-top: 0.4em; 49 | } 50 | -------------------------------------------------------------------------------- /public/assets/pure-0.6.0/menus-skin-min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Pure v0.6.0 3 | Copyright 2014 Yahoo! Inc. All rights reserved. 4 | Licensed under the BSD License. 5 | https://github.com/yahoo/pure/blob/master/LICENSE.md 6 | */ 7 | .pure-menu-separator{background-color:#ccc;height:1px;margin:.3em 0}.pure-menu-horizontal .pure-menu-separator{width:1px;height:1.3em;margin:0 .3em}.pure-menu-heading{text-transform:uppercase;color:#565d64}.pure-menu-link{color:#777}.pure-menu-children{background-color:#fff}.pure-menu-link,.pure-menu-disabled,.pure-menu-heading{padding:.5em 1em}.pure-menu-disabled{opacity:.5}.pure-menu-disabled .pure-menu-link:hover{background-color:transparent}.pure-menu-active>.pure-menu-link,.pure-menu-link:hover,.pure-menu-link:focus{background-color:#eee}.pure-menu-selected .pure-menu-link,.pure-menu-selected .pure-menu-link:visited{color:#000} -------------------------------------------------------------------------------- /public/assets/font-awesome-4.4.0/less/path.less: -------------------------------------------------------------------------------- 1 | /* FONT PATH 2 | * -------------------------- */ 3 | 4 | @font-face { 5 | font-family: 'FontAwesome'; 6 | src: url('@{fa-font-path}/fontawesome-webfont.eot?v=@{fa-version}'); 7 | src: url('@{fa-font-path}/fontawesome-webfont.eot?#iefix&v=@{fa-version}') format('embedded-opentype'), 8 | url('@{fa-font-path}/fontawesome-webfont.woff2?v=@{fa-version}') format('woff2'), 9 | url('@{fa-font-path}/fontawesome-webfont.woff?v=@{fa-version}') format('woff'), 10 | url('@{fa-font-path}/fontawesome-webfont.ttf?v=@{fa-version}') format('truetype'), 11 | url('@{fa-font-path}/fontawesome-webfont.svg?v=@{fa-version}#fontawesomeregular') format('svg'); 12 | // src: url('@{fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts 13 | font-weight: normal; 14 | font-style: normal; 15 | } 16 | -------------------------------------------------------------------------------- /public/assets/pure-0.6.0/buttons-core.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Pure v0.6.0 3 | Copyright 2014 Yahoo! Inc. All rights reserved. 4 | Licensed under the BSD License. 5 | https://github.com/yahoo/pure/blob/master/LICENSE.md 6 | */ 7 | .pure-button { 8 | /* Structure */ 9 | display: inline-block; 10 | zoom: 1; 11 | line-height: normal; 12 | white-space: nowrap; 13 | vertical-align: middle; 14 | text-align: center; 15 | cursor: pointer; 16 | -webkit-user-drag: none; 17 | -webkit-user-select: none; 18 | -moz-user-select: none; 19 | -ms-user-select: none; 20 | user-select: none; 21 | -webkit-box-sizing: border-box; 22 | -moz-box-sizing: border-box; 23 | box-sizing: border-box; 24 | } 25 | 26 | /* Firefox: Get rid of the inner focus border */ 27 | .pure-button::-moz-focus-inner { 28 | padding: 0; 29 | border: 0; 30 | } 31 | -------------------------------------------------------------------------------- /public/assets/font-awesome-4.4.0/scss/_path.scss: -------------------------------------------------------------------------------- 1 | /* FONT PATH 2 | * -------------------------- */ 3 | 4 | @font-face { 5 | font-family: 'FontAwesome'; 6 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?v=#{$fa-version}'); 7 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?#iefix&v=#{$fa-version}') format('embedded-opentype'), 8 | url('#{$fa-font-path}/fontawesome-webfont.woff2?v=#{$fa-version}') format('woff2'), 9 | url('#{$fa-font-path}/fontawesome-webfont.woff?v=#{$fa-version}') format('woff'), 10 | url('#{$fa-font-path}/fontawesome-webfont.ttf?v=#{$fa-version}') format('truetype'), 11 | url('#{$fa-font-path}/fontawesome-webfont.svg?v=#{$fa-version}#fontawesomeregular') format('svg'); 12 | // src: url('#{$fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts 13 | font-weight: normal; 14 | font-style: normal; 15 | } 16 | -------------------------------------------------------------------------------- /data/airports-csv-to-json.php: -------------------------------------------------------------------------------- 1 | $k) { 25 | $airports[$line[13]][$k] = $line[$i]; 26 | } 27 | 28 | } 29 | 30 | fclose($fp); 31 | 32 | unlink('airports.csv'); 33 | 34 | file_put_contents('airports.json', json_encode($airports, JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES)); 35 | 36 | echo "Done\n"; 37 | -------------------------------------------------------------------------------- /public/assets/font-awesome-4.4.0/less/animated.less: -------------------------------------------------------------------------------- 1 | // Animated Icons 2 | // -------------------------- 3 | 4 | .@{fa-css-prefix}-spin { 5 | -webkit-animation: fa-spin 2s infinite linear; 6 | animation: fa-spin 2s infinite linear; 7 | } 8 | 9 | .@{fa-css-prefix}-pulse { 10 | -webkit-animation: fa-spin 1s infinite steps(8); 11 | animation: fa-spin 1s infinite steps(8); 12 | } 13 | 14 | @-webkit-keyframes fa-spin { 15 | 0% { 16 | -webkit-transform: rotate(0deg); 17 | transform: rotate(0deg); 18 | } 19 | 100% { 20 | -webkit-transform: rotate(359deg); 21 | transform: rotate(359deg); 22 | } 23 | } 24 | 25 | @keyframes fa-spin { 26 | 0% { 27 | -webkit-transform: rotate(0deg); 28 | transform: rotate(0deg); 29 | } 30 | 100% { 31 | -webkit-transform: rotate(359deg); 32 | transform: rotate(359deg); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /public/assets/font-awesome-4.4.0/scss/_animated.scss: -------------------------------------------------------------------------------- 1 | // Spinning Icons 2 | // -------------------------- 3 | 4 | .#{$fa-css-prefix}-spin { 5 | -webkit-animation: fa-spin 2s infinite linear; 6 | animation: fa-spin 2s infinite linear; 7 | } 8 | 9 | .#{$fa-css-prefix}-pulse { 10 | -webkit-animation: fa-spin 1s infinite steps(8); 11 | animation: fa-spin 1s infinite steps(8); 12 | } 13 | 14 | @-webkit-keyframes fa-spin { 15 | 0% { 16 | -webkit-transform: rotate(0deg); 17 | transform: rotate(0deg); 18 | } 19 | 100% { 20 | -webkit-transform: rotate(359deg); 21 | transform: rotate(359deg); 22 | } 23 | } 24 | 25 | @keyframes fa-spin { 26 | 0% { 27 | -webkit-transform: rotate(0deg); 28 | transform: rotate(0deg); 29 | } 30 | 100% { 31 | -webkit-transform: rotate(359deg); 32 | transform: rotate(359deg); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /p3k/timezone/Result.php: -------------------------------------------------------------------------------- 1 | _now = new DateTime($date); 14 | else 15 | $this->_now = new DateTime(); 16 | $this->_now->setTimeZone(new DateTimeZone($timezone)); 17 | $this->_name = $timezone; 18 | } 19 | 20 | public function __get($key) { 21 | switch($key) { 22 | case 'offset': 23 | return $this->_now->format('P'); 24 | case 'seconds': 25 | return (int)$this->_now->format('Z'); 26 | case 'localtime': 27 | return $this->_now->format('c'); 28 | case 'name': 29 | return $this->_name; 30 | } 31 | } 32 | 33 | public function __toString() { 34 | return $this->_name; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /controllers/weather.php: -------------------------------------------------------------------------------- 1 | get('/api/weather', function() use($app) { 4 | $params = $app->request()->params(); 5 | 6 | if(k($params, 'latitude') !== null && k($params, 'longitude') !== null && k($params, 'apikey') !== null) { 7 | 8 | $lat = (float)$params['latitude']; 9 | $lng = (float)$params['longitude']; 10 | $key = $params['apikey']; 11 | 12 | $weather = \p3k\Weather::weather_for_location($lat, $lng, $key); 13 | 14 | if($weather) { 15 | json_response($app, $weather); 16 | } else { 17 | json_response($app, [ 18 | 'error' => 'not_found', 19 | 'error_description' => 'No weather information was found for the requested location, or you used an invalid API key' 20 | ]); 21 | } 22 | } else { 23 | json_response($app, [ 24 | 'error' => 'invalid_request', 25 | 'error_description' => 'Request was missing parameters' 26 | ], 400); 27 | } 28 | }); 29 | -------------------------------------------------------------------------------- /public/assets/pure-0.6.0/menus-core.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Pure v0.6.0 3 | Copyright 2014 Yahoo! Inc. All rights reserved. 4 | Licensed under the BSD License. 5 | https://github.com/yahoo/pure/blob/master/LICENSE.md 6 | */ 7 | /*csslint adjoining-classes: false, box-model:false*/ 8 | .pure-menu { 9 | -webkit-box-sizing: border-box; 10 | -moz-box-sizing: border-box; 11 | box-sizing: border-box; 12 | } 13 | 14 | .pure-menu-fixed { 15 | position: fixed; 16 | left: 0; 17 | top: 0; 18 | z-index: 3; 19 | } 20 | 21 | .pure-menu-list, 22 | .pure-menu-item { 23 | position: relative; 24 | } 25 | 26 | .pure-menu-list { 27 | list-style: none; 28 | margin: 0; 29 | padding: 0; 30 | } 31 | 32 | .pure-menu-item { 33 | padding: 0; 34 | margin: 0; 35 | height: 100%; 36 | } 37 | 38 | .pure-menu-link, 39 | .pure-menu-heading { 40 | display: block; 41 | text-decoration: none; 42 | white-space: nowrap; 43 | } 44 | -------------------------------------------------------------------------------- /public/assets/pure-0.6.0/menus-scrollable.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Pure v0.6.0 3 | Copyright 2014 Yahoo! Inc. All rights reserved. 4 | Licensed under the BSD License. 5 | https://github.com/yahoo/pure/blob/master/LICENSE.md 6 | */ 7 | /* scrollable menus */ 8 | .pure-menu-scrollable { 9 | overflow-y: scroll; 10 | overflow-x: hidden; 11 | } 12 | 13 | .pure-menu-scrollable .pure-menu-list { 14 | display: block; 15 | } 16 | 17 | .pure-menu-horizontal.pure-menu-scrollable .pure-menu-list { 18 | display: inline-block; 19 | } 20 | 21 | .pure-menu-horizontal.pure-menu-scrollable { 22 | white-space: nowrap; 23 | overflow-y: hidden; 24 | overflow-x: auto; 25 | -ms-overflow-style: none; 26 | -webkit-overflow-scrolling: touch; 27 | /* a little extra padding for this style to allow for scrollbars */ 28 | padding: .5em 0; 29 | } 30 | 31 | .pure-menu-horizontal.pure-menu-scrollable::-webkit-scrollbar { 32 | display: none; 33 | } 34 | -------------------------------------------------------------------------------- /data/airports-csv-compact.php: -------------------------------------------------------------------------------- 1 | tr:last-child>td{border-bottom-width:0}.pure-table-horizontal td,.pure-table-horizontal th{border-width:0 0 1px;border-bottom:1px solid #cbcbcb}.pure-table-horizontal tbody>tr:last-child>td{border-bottom-width:0} -------------------------------------------------------------------------------- /p3k/geocode/Result.php: -------------------------------------------------------------------------------- 1 | localityName) 16 | $parts[] = $this->localityName; 17 | if($this->regionName) 18 | $parts[] = $this->regionName; 19 | if($this->countryName) 20 | $parts[] = $this->countryName; 21 | return implode(', ', $parts); 22 | } 23 | 24 | private function _best_name() { 25 | if($this->localityName) 26 | return $this->localityName; 27 | if($this->regionName) 28 | return $this->regionName; 29 | if($this->countryName) 30 | return $this->countryName; 31 | return FALSE; 32 | } 33 | 34 | public function __get($key) { 35 | if($key == 'fullName') 36 | return $this->_full_name(); 37 | if($key == 'bestName') 38 | return $this->_best_name(); 39 | return NULL; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /public/assets/pure-0.6.0/menus-dropdown.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Pure v0.6.0 3 | Copyright 2014 Yahoo! Inc. All rights reserved. 4 | Licensed under the BSD License. 5 | https://github.com/yahoo/pure/blob/master/LICENSE.md 6 | */ 7 | /* Submenus should still be display: block; */ 8 | .pure-menu-item .pure-menu-item { 9 | display: block; 10 | } 11 | 12 | .pure-menu-children { 13 | display: none; 14 | position: absolute; 15 | left: 100%; 16 | top: 0; 17 | margin: 0; 18 | padding: 0; 19 | z-index: 3; 20 | } 21 | 22 | .pure-menu-horizontal .pure-menu-children { 23 | left: 0; 24 | top: auto; 25 | width: inherit; 26 | } 27 | 28 | .pure-menu-allow-hover:hover > .pure-menu-children, 29 | .pure-menu-active > .pure-menu-children { 30 | display: block; 31 | position: absolute; 32 | } 33 | 34 | /* Vertical Menus - show the dropdown arrow */ 35 | .pure-menu-has-children > .pure-menu-link:after { 36 | padding-left: 0.5em; 37 | content: "\25B8"; 38 | font-size: small; 39 | } 40 | 41 | /* Horizontal Menus - show the dropdown arrow */ 42 | .pure-menu-horizontal .pure-menu-has-children > .pure-menu-link:after { 43 | content: "\25BE"; 44 | } 45 | -------------------------------------------------------------------------------- /lib/helpers.php: -------------------------------------------------------------------------------- 1 | response()->status($code); 6 | $app->response()['Content-Type'] = 'application/json'; 7 | $app->response()->body(json_encode($response)); 8 | } 9 | 10 | function k($a, $k, $default=null) { 11 | if(is_array($k)) { 12 | $result = true; 13 | foreach($k as $key) { 14 | $result = $result && array_key_exists($key, $a); 15 | } 16 | return $result; 17 | } else { 18 | if(is_array($a) && array_key_exists($k, $a) && $a[$k]) 19 | return $a[$k]; 20 | elseif(is_object($a) && property_exists($a, $k) && $a->$k) 21 | return $a->$k; 22 | else 23 | return $default; 24 | } 25 | } 26 | 27 | function is_authenticated($params) { 28 | if(!isset($params['token'])) 29 | return false; 30 | 31 | $token_file = __DIR__.'/../data/apikeys.txt'; 32 | 33 | if(!file_exists($token_file)) 34 | return false; 35 | 36 | $valid_tokens = array_filter(file($token_file)); 37 | array_walk($valid_tokens, function(&$val) { 38 | $val = trim($val); 39 | }); 40 | 41 | if(in_array($params['token'], $valid_tokens)) 42 | return true; 43 | 44 | return false; 45 | } 46 | -------------------------------------------------------------------------------- /public/assets/pure-0.6.0/menus-skin.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Pure v0.6.0 3 | Copyright 2014 Yahoo! Inc. All rights reserved. 4 | Licensed under the BSD License. 5 | https://github.com/yahoo/pure/blob/master/LICENSE.md 6 | */ 7 | /* misc default styling */ 8 | 9 | .pure-menu-separator { 10 | background-color: #ccc; 11 | height: 1px; 12 | margin: .3em 0; 13 | } 14 | 15 | .pure-menu-horizontal .pure-menu-separator { 16 | width: 1px; 17 | height: 1.3em; 18 | margin: 0 .3em ; 19 | } 20 | 21 | .pure-menu-heading { 22 | text-transform: uppercase; 23 | color: #565d64; 24 | } 25 | 26 | .pure-menu-link { 27 | color: #777; 28 | } 29 | 30 | .pure-menu-children { 31 | background-color: #fff; 32 | } 33 | 34 | .pure-menu-link, 35 | .pure-menu-disabled, 36 | .pure-menu-heading { 37 | padding: .5em 1em; 38 | } 39 | 40 | .pure-menu-disabled { 41 | opacity: .5; 42 | } 43 | 44 | .pure-menu-disabled .pure-menu-link:hover { 45 | background-color: transparent; 46 | } 47 | 48 | .pure-menu-active > .pure-menu-link, 49 | .pure-menu-link:hover, 50 | .pure-menu-link:focus { 51 | background-color: #eee; 52 | } 53 | 54 | .pure-menu-selected .pure-menu-link, 55 | .pure-menu-selected .pure-menu-link:visited { 56 | color: #000; 57 | } 58 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Atlas 2 | 3 | Atlas is a set of APIs to look up information about locations. 4 | 5 | ## Timezone 6 | 7 | Retrieving the timezone at a lat/lng 8 | 9 | * `/api/timezone?latitude=45.5118&longitude=-122.6433` 10 | * `/api/timezone?airport=PDX` 11 | 12 | ## Geocoder 13 | 14 | Retrieving the lat/lng for a named location 15 | 16 | * `/api/geocode?input=309+SW+6th+Ave,+Portland,+OR` 17 | 18 | Retrieving a named location from a lat/lng 19 | 20 | * `/api/geocode?latitude=45.5118&longitude=-122.6433` 21 | * `/api/geocode?latitude=45.5118&longitude=-122.6433&date=2016-07-012T09:00:00Z` and return the local time of the given timestamp 22 | 23 | ## Weather 24 | 25 | Retrieving the current weather for a lat/lng 26 | 27 | * `/api/weather?latitude=45.5118&longitude=-122.6433&apikey=XXX` 28 | 29 | You'll need to pass an OpenWeatherMap.org API key in the request. Icon names reference the [weather-icons](https://erikflowers.github.io/weather-icons/) icon font. 30 | 31 | ## Static Maps 32 | 33 | * `/map/img?marker[]=lat:45.5165;lng:-122.6764;icon:small-blue-cutout&basemap=gray&width=600&height=240&zoom=14` 34 | 35 | [Full Static Maps Docs](https://atlas.p3k.io/static-maps) 36 | 37 | 38 | 39 | ## License 40 | 41 | Available under the Apache 2.0 license. See [[LICENSE]]. 42 | 43 | Copyright 2015-2022 by Aaron Parecki. 44 | -------------------------------------------------------------------------------- /p3k/geo/WebMercator.php: -------------------------------------------------------------------------------- 1 | lngToX($longitude, $zoom), 21 | 'y' => latToY($latitude, $zoom) 22 | ); 23 | } 24 | 25 | function xToLng($x, $zoom) { 26 | return (($x * 360) / totalPixelsForZoomLevel($zoom)) - 180; 27 | } 28 | 29 | function yToLat($y, $zoom) { 30 | $a = pi() * (($y / totalPixelsForZoomLevel($zoom - 1)) - 1); 31 | return -1 * (rad2deg(asin(tanh($a)))); 32 | } 33 | 34 | function pixelsToLatLng($x, $y, $zoom) { 35 | return array( 36 | 'lat' => yToLat($y, $zoom), 37 | 'lng' => xToLng($x, $zoom) 38 | ); 39 | } 40 | 41 | function tileToPixels($x, $y) { 42 | return array( 43 | 'x' => $x * TILE_SIZE, 44 | 'y' => $y * TILE_SIZE 45 | ); 46 | } 47 | 48 | function pixelsToTile($x, $y) { 49 | return array( 50 | 'x' => floor($x / TILE_SIZE), 51 | 'y' => floor($y / TILE_SIZE) 52 | ); 53 | } 54 | 55 | function positionInTile($x, $y) { 56 | $tile = pixelsToTile($x, $y); 57 | return array( 58 | 'x' => round(TILE_SIZE * (($x / TILE_SIZE) - $tile['x'])), 59 | 'y' => round(TILE_SIZE * (($y / TILE_SIZE) - $tile['y'])) 60 | ); 61 | } 62 | -------------------------------------------------------------------------------- /controllers/timezone.php: -------------------------------------------------------------------------------- 1 | $timezone->name, 14 | 'offset' => $timezone->offset, 15 | 'seconds' => $timezone->seconds, 16 | 'localtime' => $timezone->localtime 17 | ]; 18 | } else { 19 | return [ 20 | 'error' => 'not_found', 21 | 'error_description' => 'No timezone was found for the requested location' 22 | ]; 23 | } 24 | } 25 | 26 | $app->get('/api/timezone', function() use($app) { 27 | $params = $app->request()->params(); 28 | 29 | if(k($params, 'latitude') !== null && k($params, 'longitude') !== null) { 30 | 31 | $lat = (float)$params['latitude']; 32 | $lng = (float)$params['longitude']; 33 | 34 | $result = timezone_for_location($lat, $lng); 35 | json_response($app, $result); 36 | 37 | } elseif(k($params, 'airport')) { 38 | 39 | $code = $params['airport']; 40 | 41 | $airport = \p3k\Airports::from_code($code); 42 | 43 | if($airport) { 44 | $result = timezone_for_location($airport['latitude'], $airport['longitude']); 45 | 46 | if(!isset($result['error'])) { 47 | $result['airport'] = $airport; 48 | } 49 | 50 | json_response($app, $result); 51 | 52 | } else { 53 | json_response($app, [ 54 | 'error' => 'not_found', 55 | 'error_description' => 'The airport code was not found' 56 | ]); 57 | } 58 | 59 | } else { 60 | json_response($app, [ 61 | 'error' => 'invalid_request', 62 | 'error_description' => 'Request was missing parameters' 63 | ], 400); 64 | } 65 | }); 66 | 67 | -------------------------------------------------------------------------------- /public/assets/pure-0.6.0/buttons-min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Pure v0.6.0 3 | Copyright 2014 Yahoo! Inc. All rights reserved. 4 | Licensed under the BSD License. 5 | https://github.com/yahoo/pure/blob/master/LICENSE.md 6 | */ 7 | .pure-button{display:inline-block;zoom:1;line-height:normal;white-space:nowrap;vertical-align:middle;text-align:center;cursor:pointer;-webkit-user-drag:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.pure-button::-moz-focus-inner{padding:0;border:0}.pure-button{font-family:inherit;font-size:100%;padding:.5em 1em;color:#444;color:rgba(0,0,0,.8);border:1px solid #999;border:0 rgba(0,0,0,0);background-color:#E6E6E6;text-decoration:none;border-radius:2px}.pure-button-hover,.pure-button:hover,.pure-button:focus{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#1a000000', GradientType=0);background-image:-webkit-gradient(linear,0 0,0 100%,from(transparent),color-stop(40%,rgba(0,0,0,.05)),to(rgba(0,0,0,.1)));background-image:-webkit-linear-gradient(transparent,rgba(0,0,0,.05) 40%,rgba(0,0,0,.1));background-image:-moz-linear-gradient(top,rgba(0,0,0,.05) 0,rgba(0,0,0,.1));background-image:-o-linear-gradient(transparent,rgba(0,0,0,.05) 40%,rgba(0,0,0,.1));background-image:linear-gradient(transparent,rgba(0,0,0,.05) 40%,rgba(0,0,0,.1))}.pure-button:focus{outline:0}.pure-button-active,.pure-button:active{box-shadow:0 0 0 1px rgba(0,0,0,.15) inset,0 0 6px rgba(0,0,0,.2) inset;border-color:#000\9}.pure-button[disabled],.pure-button-disabled,.pure-button-disabled:hover,.pure-button-disabled:focus,.pure-button-disabled:active{border:0;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);filter:alpha(opacity=40);-khtml-opacity:.4;-moz-opacity:.4;opacity:.4;cursor:not-allowed;box-shadow:none}.pure-button-hidden{display:none}.pure-button::-moz-focus-inner{padding:0;border:0}.pure-button-primary,.pure-button-selected,a.pure-button-primary,a.pure-button-selected{background-color:#0078e7;color:#fff} -------------------------------------------------------------------------------- /public/assets/pure-0.6.0/tables.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Pure v0.6.0 3 | Copyright 2014 Yahoo! Inc. All rights reserved. 4 | Licensed under the BSD License. 5 | https://github.com/yahoo/pure/blob/master/LICENSE.md 6 | */ 7 | .pure-table { 8 | /* Remove spacing between table cells (from Normalize.css) */ 9 | border-collapse: collapse; 10 | border-spacing: 0; 11 | empty-cells: show; 12 | border: 1px solid #cbcbcb; 13 | } 14 | 15 | .pure-table caption { 16 | color: #000; 17 | font: italic 85%/1 arial, sans-serif; 18 | padding: 1em 0; 19 | text-align: center; 20 | } 21 | 22 | .pure-table td, 23 | .pure-table th { 24 | border-left: 1px solid #cbcbcb;/* inner column border */ 25 | border-width: 0 0 0 1px; 26 | font-size: inherit; 27 | margin: 0; 28 | overflow: visible; /*to make ths where the title is really long work*/ 29 | padding: 0.5em 1em; /* cell padding */ 30 | } 31 | 32 | /* Consider removing this next declaration block, as it causes problems when 33 | there's a rowspan on the first cell. Case added to the tests. issue#432 */ 34 | .pure-table td:first-child, 35 | .pure-table th:first-child { 36 | border-left-width: 0; 37 | } 38 | 39 | .pure-table thead { 40 | background-color: #e0e0e0; 41 | color: #000; 42 | text-align: left; 43 | vertical-align: bottom; 44 | } 45 | 46 | /* 47 | striping: 48 | even - #fff (white) 49 | odd - #f2f2f2 (light gray) 50 | */ 51 | .pure-table td { 52 | background-color: transparent; 53 | } 54 | .pure-table-odd td { 55 | background-color: #f2f2f2; 56 | } 57 | 58 | /* nth-child selector for modern browsers */ 59 | .pure-table-striped tr:nth-child(2n-1) td { 60 | background-color: #f2f2f2; 61 | } 62 | 63 | /* BORDERED TABLES */ 64 | .pure-table-bordered td { 65 | border-bottom: 1px solid #cbcbcb; 66 | } 67 | .pure-table-bordered tbody > tr:last-child > td { 68 | border-bottom-width: 0; 69 | } 70 | 71 | 72 | /* HORIZONTAL BORDERED TABLES */ 73 | 74 | .pure-table-horizontal td, 75 | .pure-table-horizontal th { 76 | border-width: 0 0 1px 0; 77 | border-bottom: 1px solid #cbcbcb; 78 | } 79 | .pure-table-horizontal tbody > tr:last-child > td { 80 | border-bottom-width: 0; 81 | } 82 | -------------------------------------------------------------------------------- /controllers/geocode.php: -------------------------------------------------------------------------------- 1 | get('/api/geocode', function() use($app) { 4 | $params = $app->request()->params(); 5 | 6 | if( 7 | (k($params, 'latitude') !== null && k($params, 'longitude') !== null) 8 | || k($params, 'input') !== null 9 | ) { 10 | 11 | $response = [ 12 | 'latitude' => null, 13 | 'longitude' => null, 14 | 'locality' => null, 15 | 'region' => null, 16 | 'country' => null, 17 | 'best_name' => null, 18 | 'full_name' => null, 19 | 'postal-code' => null, 20 | 'timezone' => null, 21 | 'offset' => null, 22 | 'seconds' => null, 23 | 'localtime' => null, 24 | ]; 25 | 26 | if(k($params, 'input')) { 27 | $adr = p3k\Geocoder::geocode($params['input']); 28 | } else { 29 | $lat = (float)$params['latitude']; 30 | $lng = (float)$params['longitude']; 31 | $response['latitude'] = $lat; 32 | $response['longitude'] = $lng; 33 | $adr = p3k\Geocoder::adrFromLocation($lat, $lng); 34 | } 35 | 36 | if($adr) { 37 | $response['latitude'] = $adr->latitude; 38 | $response['longitude'] = $adr->longitude; 39 | $response['locality'] = $adr->localityName; 40 | $response['region'] = $adr->regionName; 41 | $response['country'] = $adr->countryName; 42 | $response['best_name'] = $adr->bestName; 43 | $response['full_name'] = $adr->fullName; 44 | $response['postal-code'] = $adr->postalCode; 45 | } 46 | 47 | $tz = p3k\Timezone::timezone_for_location($response['latitude'], $response['longitude'], k($params,'date')); 48 | $timezone = false; 49 | if($tz) { 50 | $timezone = new p3k\timezone\Result($tz, k($params, 'date')); 51 | } 52 | 53 | if($timezone) { 54 | $response['timezone'] = $timezone->name; 55 | $response['offset'] = $timezone->offset; 56 | $response['seconds'] = $timezone->seconds; 57 | $response['localtime'] = $timezone->localtime; 58 | } 59 | 60 | json_response($app, $response); 61 | } else { 62 | json_response($app, [ 63 | 'error' => 'invalid_request', 64 | 'error_description' => 'Request was missing parameters' 65 | ], 400); 66 | } 67 | }); 68 | -------------------------------------------------------------------------------- /public/assets/pure-0.6.0/grids-units-min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Pure v0.6.0 3 | Copyright 2014 Yahoo! Inc. All rights reserved. 4 | Licensed under the BSD License. 5 | https://github.com/yahoo/pure/blob/master/LICENSE.md 6 | */ 7 | .pure-u-1,.pure-u-1-1,.pure-u-1-2,.pure-u-1-3,.pure-u-2-3,.pure-u-1-4,.pure-u-3-4,.pure-u-1-5,.pure-u-2-5,.pure-u-3-5,.pure-u-4-5,.pure-u-5-5,.pure-u-1-6,.pure-u-5-6,.pure-u-1-8,.pure-u-3-8,.pure-u-5-8,.pure-u-7-8,.pure-u-1-12,.pure-u-5-12,.pure-u-7-12,.pure-u-11-12,.pure-u-1-24,.pure-u-2-24,.pure-u-3-24,.pure-u-4-24,.pure-u-5-24,.pure-u-6-24,.pure-u-7-24,.pure-u-8-24,.pure-u-9-24,.pure-u-10-24,.pure-u-11-24,.pure-u-12-24,.pure-u-13-24,.pure-u-14-24,.pure-u-15-24,.pure-u-16-24,.pure-u-17-24,.pure-u-18-24,.pure-u-19-24,.pure-u-20-24,.pure-u-21-24,.pure-u-22-24,.pure-u-23-24,.pure-u-24-24{display:inline-block;*display:inline;zoom:1;letter-spacing:normal;word-spacing:normal;vertical-align:top;text-rendering:auto}.pure-u-1-24{width:4.1667%;*width:4.1357%}.pure-u-1-12,.pure-u-2-24{width:8.3333%;*width:8.3023%}.pure-u-1-8,.pure-u-3-24{width:12.5%;*width:12.469%}.pure-u-1-6,.pure-u-4-24{width:16.6667%;*width:16.6357%}.pure-u-1-5{width:20%;*width:19.969%}.pure-u-5-24{width:20.8333%;*width:20.8023%}.pure-u-1-4,.pure-u-6-24{width:25%;*width:24.969%}.pure-u-7-24{width:29.1667%;*width:29.1357%}.pure-u-1-3,.pure-u-8-24{width:33.3333%;*width:33.3023%}.pure-u-3-8,.pure-u-9-24{width:37.5%;*width:37.469%}.pure-u-2-5{width:40%;*width:39.969%}.pure-u-5-12,.pure-u-10-24{width:41.6667%;*width:41.6357%}.pure-u-11-24{width:45.8333%;*width:45.8023%}.pure-u-1-2,.pure-u-12-24{width:50%;*width:49.969%}.pure-u-13-24{width:54.1667%;*width:54.1357%}.pure-u-7-12,.pure-u-14-24{width:58.3333%;*width:58.3023%}.pure-u-3-5{width:60%;*width:59.969%}.pure-u-5-8,.pure-u-15-24{width:62.5%;*width:62.469%}.pure-u-2-3,.pure-u-16-24{width:66.6667%;*width:66.6357%}.pure-u-17-24{width:70.8333%;*width:70.8023%}.pure-u-3-4,.pure-u-18-24{width:75%;*width:74.969%}.pure-u-19-24{width:79.1667%;*width:79.1357%}.pure-u-4-5{width:80%;*width:79.969%}.pure-u-5-6,.pure-u-20-24{width:83.3333%;*width:83.3023%}.pure-u-7-8,.pure-u-21-24{width:87.5%;*width:87.469%}.pure-u-11-12,.pure-u-22-24{width:91.6667%;*width:91.6357%}.pure-u-23-24{width:95.8333%;*width:95.8023%}.pure-u-1,.pure-u-1-1,.pure-u-5-5,.pure-u-24-24{width:100%} -------------------------------------------------------------------------------- /views/index.php: -------------------------------------------------------------------------------- 1 |
2 |

Atlas

3 |

Atlas is a set of APIs for looking up information about locations.

4 |
5 | 6 |
7 | 8 |

Timezone

9 | 10 |

Retrieving the timezone at a lat/lng

11 | 12 | 16 | 17 |

Geocoder

18 | 19 |

Retrieving the lat/lng for a named location

20 | 21 | 24 | 25 |

Retrieving a named location from a lat/lng

26 | 27 | 31 | 32 |

Weather

33 | 34 |

Retrieving the current weather for a lat/lng

35 | 36 | 39 | 40 |

You'll need to pass an OpenWeatherMap.org API key in the request. Icon names reference the weather-icons icon font.

41 | 42 |

Static Maps

43 | 44 |

/map/img?marker[]=lat:45.5165;lng:-122.6764;icon:small-blue-cutout&basemap=gray&width=600&height=240&zoom=14

45 | 46 | 47 |

Full API docs

48 | 49 |
50 | -------------------------------------------------------------------------------- /public/assets/pure-0.6.0/base-min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Pure v0.6.0 3 | Copyright 2014 Yahoo! Inc. All rights reserved. 4 | Licensed under the BSD License. 5 | https://github.com/yahoo/pure/blob/master/LICENSE.md 6 | */ 7 | /*! 8 | normalize.css v^3.0 | MIT License | git.io/normalize 9 | Copyright (c) Nicolas Gallagher and Jonathan Neal 10 | */ 11 | /*! normalize.css v3.0.2 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}.hidden,[hidden]{display:none!important}.pure-img{max-width:100%;height:auto;display:block} -------------------------------------------------------------------------------- /public/assets/pure-0.6.0/menus-min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Pure v0.6.0 3 | Copyright 2014 Yahoo! Inc. All rights reserved. 4 | Licensed under the BSD License. 5 | https://github.com/yahoo/pure/blob/master/LICENSE.md 6 | */ 7 | .pure-menu{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.pure-menu-fixed{position:fixed;left:0;top:0;z-index:3}.pure-menu-list,.pure-menu-item{position:relative}.pure-menu-list{list-style:none;margin:0;padding:0}.pure-menu-item{padding:0;margin:0;height:100%}.pure-menu-link,.pure-menu-heading{display:block;text-decoration:none;white-space:nowrap}.pure-menu-horizontal{width:100%;white-space:nowrap}.pure-menu-horizontal .pure-menu-list{display:inline-block}.pure-menu-horizontal .pure-menu-item,.pure-menu-horizontal .pure-menu-heading,.pure-menu-horizontal .pure-menu-separator{display:inline-block;*display:inline;zoom:1;vertical-align:middle}.pure-menu-item .pure-menu-item{display:block}.pure-menu-children{display:none;position:absolute;left:100%;top:0;margin:0;padding:0;z-index:3}.pure-menu-horizontal .pure-menu-children{left:0;top:auto;width:inherit}.pure-menu-allow-hover:hover>.pure-menu-children,.pure-menu-active>.pure-menu-children{display:block;position:absolute}.pure-menu-has-children>.pure-menu-link:after{padding-left:.5em;content:"\25B8";font-size:small}.pure-menu-horizontal .pure-menu-has-children>.pure-menu-link:after{content:"\25BE"}.pure-menu-scrollable{overflow-y:scroll;overflow-x:hidden}.pure-menu-scrollable .pure-menu-list{display:block}.pure-menu-horizontal.pure-menu-scrollable .pure-menu-list{display:inline-block}.pure-menu-horizontal.pure-menu-scrollable{white-space:nowrap;overflow-y:hidden;overflow-x:auto;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;padding:.5em 0}.pure-menu-horizontal.pure-menu-scrollable::-webkit-scrollbar{display:none}.pure-menu-separator{background-color:#ccc;height:1px;margin:.3em 0}.pure-menu-horizontal .pure-menu-separator{width:1px;height:1.3em;margin:0 .3em}.pure-menu-heading{text-transform:uppercase;color:#565d64}.pure-menu-link{color:#777}.pure-menu-children{background-color:#fff}.pure-menu-link,.pure-menu-disabled,.pure-menu-heading{padding:.5em 1em}.pure-menu-disabled{opacity:.5}.pure-menu-disabled .pure-menu-link:hover{background-color:transparent}.pure-menu-active>.pure-menu-link,.pure-menu-link:hover,.pure-menu-link:focus{background-color:#eee}.pure-menu-selected .pure-menu-link,.pure-menu-selected .pure-menu-link:visited{color:#000} -------------------------------------------------------------------------------- /public/assets/pure-0.6.0/grids-core.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Pure v0.6.0 3 | Copyright 2014 Yahoo! Inc. All rights reserved. 4 | Licensed under the BSD License. 5 | https://github.com/yahoo/pure/blob/master/LICENSE.md 6 | */ 7 | /*csslint regex-selectors:false, known-properties:false, duplicate-properties:false*/ 8 | 9 | .pure-g { 10 | letter-spacing: -0.31em; /* Webkit: collapse white-space between units */ 11 | *letter-spacing: normal; /* reset IE < 8 */ 12 | *word-spacing: -0.43em; /* IE < 8: collapse white-space between units */ 13 | text-rendering: optimizespeed; /* Webkit: fixes text-rendering: optimizeLegibility */ 14 | 15 | /* 16 | Sets the font stack to fonts known to work properly with the above letter 17 | and word spacings. See: https://github.com/yahoo/pure/issues/41/ 18 | 19 | The following font stack makes Pure Grids work on all known environments. 20 | 21 | * FreeSans: Ships with many Linux distros, including Ubuntu 22 | 23 | * Arimo: Ships with Chrome OS. Arimo has to be defined before Helvetica and 24 | Arial to get picked up by the browser, even though neither is available 25 | in Chrome OS. 26 | 27 | * Droid Sans: Ships with all versions of Android. 28 | 29 | * Helvetica, Arial, sans-serif: Common font stack on OS X and Windows. 30 | */ 31 | font-family: FreeSans, Arimo, "Droid Sans", Helvetica, Arial, sans-serif; 32 | 33 | /* 34 | Use flexbox when possible to avoid `letter-spacing` side-effects. 35 | 36 | NOTE: Firefox (as of 25) does not currently support flex-wrap, so the 37 | `-moz-` prefix version is omitted. 38 | */ 39 | 40 | display: -webkit-flex; 41 | -webkit-flex-flow: row wrap; 42 | 43 | /* IE10 uses display: flexbox */ 44 | display: -ms-flexbox; 45 | -ms-flex-flow: row wrap; 46 | 47 | /* Prevents distributing space between rows */ 48 | -ms-align-content: flex-start; 49 | -webkit-align-content: flex-start; 50 | align-content: flex-start; 51 | } 52 | 53 | /* Opera as of 12 on Windows needs word-spacing. 54 | The ".opera-only" selector is used to prevent actual prefocus styling 55 | and is not required in markup. 56 | */ 57 | .opera-only :-o-prefocus, 58 | .pure-g { 59 | word-spacing: -0.43em; 60 | } 61 | 62 | .pure-u { 63 | display: inline-block; 64 | *display: inline; /* IE < 8: fake inline-block */ 65 | zoom: 1; 66 | letter-spacing: normal; 67 | word-spacing: normal; 68 | vertical-align: top; 69 | text-rendering: auto; 70 | } 71 | 72 | /* 73 | Resets the font family back to the OS/browser's default sans-serif font, 74 | this the same font stack that Normalize.css sets for the `body`. 75 | */ 76 | .pure-g [class *= "pure-u"] { 77 | font-family: sans-serif; 78 | } 79 | -------------------------------------------------------------------------------- /public/assets/pure-0.6.0/base-context-min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Pure v0.6.0 3 | Copyright 2014 Yahoo! Inc. All rights reserved. 4 | Licensed under the BSD License. 5 | https://github.com/yahoo/pure/blob/master/LICENSE.md 6 | */ 7 | /*! 8 | normalize.css v^3.0 | MIT License | git.io/normalize 9 | Copyright (c) Nicolas Gallagher and Jonathan Neal 10 | */ 11 | /*! normalize.css v3.0.2 | MIT License | git.io/normalize */.pure{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}.pure{margin:0}.pure article,.pure aside,.pure details,.pure figcaption,.pure figure,.pure footer,.pure header,.pure hgroup,.pure main,.pure menu,.pure nav,.pure section,.pure summary{display:block}.pure audio,.pure canvas,.pure progress,.pure video{display:inline-block;vertical-align:baseline}.pure audio:not([controls]){display:none;height:0}.pure [hidden],.pure template{display:none}.pure a{background-color:transparent}.pure a:active,.pure a:hover{outline:0}.pure abbr[title]{border-bottom:1px dotted}.pure b,.pure strong{font-weight:700}.pure dfn{font-style:italic}.pure h1{font-size:2em;margin:.67em 0}.pure mark{background:#ff0;color:#000}.pure small{font-size:80%}.pure sub,.pure sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}.pure sup{top:-.5em}.pure sub{bottom:-.25em}.pure img{border:0}.pure svg:not(:root){overflow:hidden}.pure figure{margin:1em 40px}.pure hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}.pure pre{overflow:auto}.pure code,.pure kbd,.pure pre,.pure samp{font-family:monospace,monospace;font-size:1em}.pure button,.pure input,.pure optgroup,.pure select,.pure textarea{color:inherit;font:inherit;margin:0}.pure button{overflow:visible}.pure button,.pure select{text-transform:none}.pure button,.pure input[type=button],.pure input[type=reset],.pure input[type=submit]{-webkit-appearance:button;cursor:pointer}.pure button[disabled],.pure input[disabled]{cursor:default}.pure button::-moz-focus-inner,.pure input::-moz-focus-inner{border:0;padding:0}.pure input{line-height:normal}.pure input[type=checkbox],.pure input[type=radio]{box-sizing:border-box;padding:0}.pure input[type=number]::-webkit-inner-spin-button,.pure input[type=number]::-webkit-outer-spin-button{height:auto}.pure input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}.pure input[type=search]::-webkit-search-cancel-button,.pure input[type=search]::-webkit-search-decoration{-webkit-appearance:none}.pure fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}.pure legend{border:0;padding:0}.pure textarea{overflow:auto}.pure optgroup{font-weight:700}.pure table{border-collapse:collapse;border-spacing:0}.pure td,.pure th{padding:0}.pure .hidden,.pure [hidden]{display:none!important}.pure .pure-img{max-width:100%;height:auto;display:block} -------------------------------------------------------------------------------- /public/assets/pure-0.6.0/grids-min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Pure v0.6.0 3 | Copyright 2014 Yahoo! Inc. All rights reserved. 4 | Licensed under the BSD License. 5 | https://github.com/yahoo/pure/blob/master/LICENSE.md 6 | */ 7 | .pure-g{letter-spacing:-.31em;*letter-spacing:normal;*word-spacing:-.43em;text-rendering:optimizespeed;font-family:FreeSans,Arimo,"Droid Sans",Helvetica,Arial,sans-serif;display:-webkit-flex;-webkit-flex-flow:row wrap;display:-ms-flexbox;-ms-flex-flow:row wrap;-ms-align-content:flex-start;-webkit-align-content:flex-start;align-content:flex-start}.opera-only :-o-prefocus,.pure-g{word-spacing:-.43em}.pure-u{display:inline-block;*display:inline;zoom:1;letter-spacing:normal;word-spacing:normal;vertical-align:top;text-rendering:auto}.pure-g [class *="pure-u"]{font-family:sans-serif}.pure-u-1,.pure-u-1-1,.pure-u-1-2,.pure-u-1-3,.pure-u-2-3,.pure-u-1-4,.pure-u-3-4,.pure-u-1-5,.pure-u-2-5,.pure-u-3-5,.pure-u-4-5,.pure-u-5-5,.pure-u-1-6,.pure-u-5-6,.pure-u-1-8,.pure-u-3-8,.pure-u-5-8,.pure-u-7-8,.pure-u-1-12,.pure-u-5-12,.pure-u-7-12,.pure-u-11-12,.pure-u-1-24,.pure-u-2-24,.pure-u-3-24,.pure-u-4-24,.pure-u-5-24,.pure-u-6-24,.pure-u-7-24,.pure-u-8-24,.pure-u-9-24,.pure-u-10-24,.pure-u-11-24,.pure-u-12-24,.pure-u-13-24,.pure-u-14-24,.pure-u-15-24,.pure-u-16-24,.pure-u-17-24,.pure-u-18-24,.pure-u-19-24,.pure-u-20-24,.pure-u-21-24,.pure-u-22-24,.pure-u-23-24,.pure-u-24-24{display:inline-block;*display:inline;zoom:1;letter-spacing:normal;word-spacing:normal;vertical-align:top;text-rendering:auto}.pure-u-1-24{width:4.1667%;*width:4.1357%}.pure-u-1-12,.pure-u-2-24{width:8.3333%;*width:8.3023%}.pure-u-1-8,.pure-u-3-24{width:12.5%;*width:12.469%}.pure-u-1-6,.pure-u-4-24{width:16.6667%;*width:16.6357%}.pure-u-1-5{width:20%;*width:19.969%}.pure-u-5-24{width:20.8333%;*width:20.8023%}.pure-u-1-4,.pure-u-6-24{width:25%;*width:24.969%}.pure-u-7-24{width:29.1667%;*width:29.1357%}.pure-u-1-3,.pure-u-8-24{width:33.3333%;*width:33.3023%}.pure-u-3-8,.pure-u-9-24{width:37.5%;*width:37.469%}.pure-u-2-5{width:40%;*width:39.969%}.pure-u-5-12,.pure-u-10-24{width:41.6667%;*width:41.6357%}.pure-u-11-24{width:45.8333%;*width:45.8023%}.pure-u-1-2,.pure-u-12-24{width:50%;*width:49.969%}.pure-u-13-24{width:54.1667%;*width:54.1357%}.pure-u-7-12,.pure-u-14-24{width:58.3333%;*width:58.3023%}.pure-u-3-5{width:60%;*width:59.969%}.pure-u-5-8,.pure-u-15-24{width:62.5%;*width:62.469%}.pure-u-2-3,.pure-u-16-24{width:66.6667%;*width:66.6357%}.pure-u-17-24{width:70.8333%;*width:70.8023%}.pure-u-3-4,.pure-u-18-24{width:75%;*width:74.969%}.pure-u-19-24{width:79.1667%;*width:79.1357%}.pure-u-4-5{width:80%;*width:79.969%}.pure-u-5-6,.pure-u-20-24{width:83.3333%;*width:83.3023%}.pure-u-7-8,.pure-u-21-24{width:87.5%;*width:87.469%}.pure-u-11-12,.pure-u-22-24{width:91.6667%;*width:91.6357%}.pure-u-23-24{width:95.8333%;*width:95.8023%}.pure-u-1,.pure-u-1-1,.pure-u-5-5,.pure-u-24-24{width:100%} -------------------------------------------------------------------------------- /public/assets/pure-0.6.0/LICENSE.md: -------------------------------------------------------------------------------- 1 | Software License Agreement (BSD License) 2 | ======================================== 3 | 4 | Copyright 2014 Yahoo! Inc. All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | * Redistributions of source code must retain the above copyright 10 | notice, this list of conditions and the following disclaimer. 11 | 12 | * Redistributions in binary form must reproduce the above copyright 13 | notice, this list of conditions and the following disclaimer in the 14 | documentation and/or other materials provided with the distribution. 15 | 16 | * Neither the name of the Yahoo! Inc. nor the 17 | names of its contributors may be used to endorse or promote products 18 | derived from this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 21 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 22 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL YAHOO! INC. BE LIABLE FOR ANY 24 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 27 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | 32 | Normalize.css License 33 | ===================== 34 | 35 | Copyright (c) Nicolas Gallagher and Jonathan Neal 36 | 37 | Permission is hereby granted, free of charge, to any person obtaining a copy of 38 | this software and associated documentation files (the "Software"), to deal in 39 | the Software without restriction, including without limitation the rights to 40 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 41 | the Software, and to permit persons to whom the Software is furnished to do so, 42 | subject to the following conditions: 43 | 44 | The above copyright notice and this permission notice shall be included in all 45 | copies or substantial portions of the Software. 46 | 47 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 48 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 49 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 50 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 51 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 52 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 53 | -------------------------------------------------------------------------------- /public/assets/pure-0.6.0/buttons.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Pure v0.6.0 3 | Copyright 2014 Yahoo! Inc. All rights reserved. 4 | Licensed under the BSD License. 5 | https://github.com/yahoo/pure/blob/master/LICENSE.md 6 | */ 7 | .pure-button { 8 | /* Structure */ 9 | display: inline-block; 10 | zoom: 1; 11 | line-height: normal; 12 | white-space: nowrap; 13 | vertical-align: middle; 14 | text-align: center; 15 | cursor: pointer; 16 | -webkit-user-drag: none; 17 | -webkit-user-select: none; 18 | -moz-user-select: none; 19 | -ms-user-select: none; 20 | user-select: none; 21 | -webkit-box-sizing: border-box; 22 | -moz-box-sizing: border-box; 23 | box-sizing: border-box; 24 | } 25 | 26 | /* Firefox: Get rid of the inner focus border */ 27 | .pure-button::-moz-focus-inner { 28 | padding: 0; 29 | border: 0; 30 | } 31 | 32 | /*csslint outline-none:false*/ 33 | 34 | .pure-button { 35 | font-family: inherit; 36 | font-size: 100%; 37 | padding: 0.5em 1em; 38 | color: #444; /* rgba not supported (IE 8) */ 39 | color: rgba(0, 0, 0, 0.80); /* rgba supported */ 40 | border: 1px solid #999; /*IE 6/7/8*/ 41 | border: none rgba(0, 0, 0, 0); /*IE9 + everything else*/ 42 | background-color: #E6E6E6; 43 | text-decoration: none; 44 | border-radius: 2px; 45 | } 46 | 47 | .pure-button-hover, 48 | .pure-button:hover, 49 | .pure-button:focus { 50 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#1a000000',GradientType=0); 51 | background-image: -webkit-gradient(linear, 0 0, 0 100%, from(transparent), color-stop(40%, rgba(0,0,0, 0.05)), to(rgba(0,0,0, 0.10))); 52 | background-image: -webkit-linear-gradient(transparent, rgba(0,0,0, 0.05) 40%, rgba(0,0,0, 0.10)); 53 | background-image: -moz-linear-gradient(top, rgba(0,0,0, 0.05) 0%, rgba(0,0,0, 0.10)); 54 | background-image: -o-linear-gradient(transparent, rgba(0,0,0, 0.05) 40%, rgba(0,0,0, 0.10)); 55 | background-image: linear-gradient(transparent, rgba(0,0,0, 0.05) 40%, rgba(0,0,0, 0.10)); 56 | } 57 | .pure-button:focus { 58 | outline: 0; 59 | } 60 | .pure-button-active, 61 | .pure-button:active { 62 | box-shadow: 0 0 0 1px rgba(0,0,0, 0.15) inset, 0 0 6px rgba(0,0,0, 0.20) inset; 63 | border-color: #000\9; 64 | } 65 | 66 | .pure-button[disabled], 67 | .pure-button-disabled, 68 | .pure-button-disabled:hover, 69 | .pure-button-disabled:focus, 70 | .pure-button-disabled:active { 71 | border: none; 72 | background-image: none; 73 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 74 | filter: alpha(opacity=40); 75 | -khtml-opacity: 0.40; 76 | -moz-opacity: 0.40; 77 | opacity: 0.40; 78 | cursor: not-allowed; 79 | box-shadow: none; 80 | } 81 | 82 | .pure-button-hidden { 83 | display: none; 84 | } 85 | 86 | /* Firefox: Get rid of the inner focus border */ 87 | .pure-button::-moz-focus-inner{ 88 | padding: 0; 89 | border: 0; 90 | } 91 | 92 | .pure-button-primary, 93 | .pure-button-selected, 94 | a.pure-button-primary, 95 | a.pure-button-selected { 96 | background-color: rgb(0, 120, 231); 97 | color: #fff; 98 | } 99 | -------------------------------------------------------------------------------- /p3k/Geocoder.php: -------------------------------------------------------------------------------- 1 | address; 16 | 17 | $result = new geocode\Result; 18 | 19 | $result->latitude = $lat; 20 | $result->longitude = $lng; 21 | 22 | if(property_exists($address, 'Postal')) 23 | $result->postalCode = $address->Postal; 24 | 25 | if(property_exists($address, 'Region')) 26 | $result->regionName = $address->Region; 27 | 28 | if(property_exists($address, 'City')) 29 | $result->localityName = $address->City; 30 | elseif(property_exists($address, 'Subregion')) 31 | $result->localityName = $address->Subregion; 32 | elseif(property_exists($address, 'Neighborhood')) 33 | $result->localityName = $address->Neighborhood; 34 | 35 | if(property_exists($address, 'CountryCode')) 36 | $result->countryName = $address->CountryCode; 37 | 38 | return $result; 39 | } 40 | 41 | public static function geocode($input) { 42 | $response = self::_geocode($input); 43 | 44 | if(!$response || !property_exists($response, 'locations') || count($response->locations) == 0) 45 | return false; 46 | 47 | $location = $response->locations[0]; 48 | $attributes = $location->feature->attributes; 49 | $geometry = $location->feature->geometry; 50 | 51 | $result = new geocode\Result; 52 | 53 | if($geometry) { 54 | $result->latitude = $geometry->y; 55 | $result->longitude = $geometry->x; 56 | } 57 | 58 | if($attributes->City) 59 | $result->localityName = $attributes->City; 60 | 61 | if($attributes->Region) 62 | $result->regionName = $attributes->Region; 63 | 64 | if($attributes->Country) 65 | $result->countryName = $attributes->Country; 66 | 67 | if($attributes->Postal) { 68 | $result->postalCode = $attributes->Postal; 69 | } else { 70 | // If no postal code is returned, but there was coordinates, then reverse geocode to find the postal code 71 | if($geometry) { 72 | $rev = self::_reverse($result->latitude, $result->longitude); 73 | if($rev && property_exists($rev->address, 'Postal')) { 74 | $result->postalCode = $rev->address->Postal; 75 | } 76 | } 77 | } 78 | 79 | if($location->name) 80 | $result->fullAddress = $location->name; 81 | 82 | return $result; 83 | } 84 | 85 | private static function _reverse($lat, $lng) { 86 | $ch = curl_init(); 87 | curl_setopt($ch, CURLOPT_URL, 'https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/reverseGeocode?location='.$lng.'%2C'.$lat.'&outSR=4326&f=json&distance=10000'); 88 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); 89 | // curl_setopt($ch, CURLOPT_USERAGENT, ''); 90 | curl_setopt($ch, CURLOPT_TIMEOUT, 5); 91 | $result = curl_exec($ch); 92 | 93 | if($result == FALSE) 94 | return FALSE; 95 | 96 | return json_decode($result); 97 | } 98 | 99 | private static function _geocode($input) { 100 | $ch = curl_init(); 101 | 102 | $params = [ 103 | 'f' => 'json', 104 | 'outSR' => 4326, 105 | 'text' => $input, 106 | 'outFields' => 'City,Region,Country,Postal', 107 | ]; 108 | 109 | curl_setopt($ch, CURLOPT_URL, 'https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/find?' . http_build_query($params)); 110 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); 111 | // curl_setopt($ch, CURLOPT_USERAGENT, ''); 112 | curl_setopt($ch, CURLOPT_TIMEOUT, 5); 113 | $result = curl_exec($ch); 114 | 115 | if($result == FALSE) 116 | return FALSE; 117 | 118 | return json_decode($result); 119 | } 120 | 121 | } 122 | -------------------------------------------------------------------------------- /public/assets/pure-0.6.0/grids-units.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Pure v0.6.0 3 | Copyright 2014 Yahoo! Inc. All rights reserved. 4 | Licensed under the BSD License. 5 | https://github.com/yahoo/pure/blob/master/LICENSE.md 6 | */ 7 | .pure-u-1, 8 | .pure-u-1-1, 9 | .pure-u-1-2, 10 | .pure-u-1-3, 11 | .pure-u-2-3, 12 | .pure-u-1-4, 13 | .pure-u-3-4, 14 | .pure-u-1-5, 15 | .pure-u-2-5, 16 | .pure-u-3-5, 17 | .pure-u-4-5, 18 | .pure-u-5-5, 19 | .pure-u-1-6, 20 | .pure-u-5-6, 21 | .pure-u-1-8, 22 | .pure-u-3-8, 23 | .pure-u-5-8, 24 | .pure-u-7-8, 25 | .pure-u-1-12, 26 | .pure-u-5-12, 27 | .pure-u-7-12, 28 | .pure-u-11-12, 29 | .pure-u-1-24, 30 | .pure-u-2-24, 31 | .pure-u-3-24, 32 | .pure-u-4-24, 33 | .pure-u-5-24, 34 | .pure-u-6-24, 35 | .pure-u-7-24, 36 | .pure-u-8-24, 37 | .pure-u-9-24, 38 | .pure-u-10-24, 39 | .pure-u-11-24, 40 | .pure-u-12-24, 41 | .pure-u-13-24, 42 | .pure-u-14-24, 43 | .pure-u-15-24, 44 | .pure-u-16-24, 45 | .pure-u-17-24, 46 | .pure-u-18-24, 47 | .pure-u-19-24, 48 | .pure-u-20-24, 49 | .pure-u-21-24, 50 | .pure-u-22-24, 51 | .pure-u-23-24, 52 | .pure-u-24-24 { 53 | display: inline-block; 54 | *display: inline; 55 | zoom: 1; 56 | letter-spacing: normal; 57 | word-spacing: normal; 58 | vertical-align: top; 59 | text-rendering: auto; 60 | } 61 | 62 | .pure-u-1-24 { 63 | width: 4.1667%; 64 | *width: 4.1357%; 65 | } 66 | 67 | .pure-u-1-12, 68 | .pure-u-2-24 { 69 | width: 8.3333%; 70 | *width: 8.3023%; 71 | } 72 | 73 | .pure-u-1-8, 74 | .pure-u-3-24 { 75 | width: 12.5000%; 76 | *width: 12.4690%; 77 | } 78 | 79 | .pure-u-1-6, 80 | .pure-u-4-24 { 81 | width: 16.6667%; 82 | *width: 16.6357%; 83 | } 84 | 85 | .pure-u-1-5 { 86 | width: 20%; 87 | *width: 19.9690%; 88 | } 89 | 90 | .pure-u-5-24 { 91 | width: 20.8333%; 92 | *width: 20.8023%; 93 | } 94 | 95 | .pure-u-1-4, 96 | .pure-u-6-24 { 97 | width: 25%; 98 | *width: 24.9690%; 99 | } 100 | 101 | .pure-u-7-24 { 102 | width: 29.1667%; 103 | *width: 29.1357%; 104 | } 105 | 106 | .pure-u-1-3, 107 | .pure-u-8-24 { 108 | width: 33.3333%; 109 | *width: 33.3023%; 110 | } 111 | 112 | .pure-u-3-8, 113 | .pure-u-9-24 { 114 | width: 37.5000%; 115 | *width: 37.4690%; 116 | } 117 | 118 | .pure-u-2-5 { 119 | width: 40%; 120 | *width: 39.9690%; 121 | } 122 | 123 | .pure-u-5-12, 124 | .pure-u-10-24 { 125 | width: 41.6667%; 126 | *width: 41.6357%; 127 | } 128 | 129 | .pure-u-11-24 { 130 | width: 45.8333%; 131 | *width: 45.8023%; 132 | } 133 | 134 | .pure-u-1-2, 135 | .pure-u-12-24 { 136 | width: 50%; 137 | *width: 49.9690%; 138 | } 139 | 140 | .pure-u-13-24 { 141 | width: 54.1667%; 142 | *width: 54.1357%; 143 | } 144 | 145 | .pure-u-7-12, 146 | .pure-u-14-24 { 147 | width: 58.3333%; 148 | *width: 58.3023%; 149 | } 150 | 151 | .pure-u-3-5 { 152 | width: 60%; 153 | *width: 59.9690%; 154 | } 155 | 156 | .pure-u-5-8, 157 | .pure-u-15-24 { 158 | width: 62.5000%; 159 | *width: 62.4690%; 160 | } 161 | 162 | .pure-u-2-3, 163 | .pure-u-16-24 { 164 | width: 66.6667%; 165 | *width: 66.6357%; 166 | } 167 | 168 | .pure-u-17-24 { 169 | width: 70.8333%; 170 | *width: 70.8023%; 171 | } 172 | 173 | .pure-u-3-4, 174 | .pure-u-18-24 { 175 | width: 75%; 176 | *width: 74.9690%; 177 | } 178 | 179 | .pure-u-19-24 { 180 | width: 79.1667%; 181 | *width: 79.1357%; 182 | } 183 | 184 | .pure-u-4-5 { 185 | width: 80%; 186 | *width: 79.9690%; 187 | } 188 | 189 | .pure-u-5-6, 190 | .pure-u-20-24 { 191 | width: 83.3333%; 192 | *width: 83.3023%; 193 | } 194 | 195 | .pure-u-7-8, 196 | .pure-u-21-24 { 197 | width: 87.5000%; 198 | *width: 87.4690%; 199 | } 200 | 201 | .pure-u-11-12, 202 | .pure-u-22-24 { 203 | width: 91.6667%; 204 | *width: 91.6357%; 205 | } 206 | 207 | .pure-u-23-24 { 208 | width: 95.8333%; 209 | *width: 95.8023%; 210 | } 211 | 212 | .pure-u-1, 213 | .pure-u-1-1, 214 | .pure-u-5-5, 215 | .pure-u-24-24 { 216 | width: 100%; 217 | } -------------------------------------------------------------------------------- /public/assets/pure-0.6.0/menus.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Pure v0.6.0 3 | Copyright 2014 Yahoo! Inc. All rights reserved. 4 | Licensed under the BSD License. 5 | https://github.com/yahoo/pure/blob/master/LICENSE.md 6 | */ 7 | /*csslint adjoining-classes: false, box-model:false*/ 8 | .pure-menu { 9 | -webkit-box-sizing: border-box; 10 | -moz-box-sizing: border-box; 11 | box-sizing: border-box; 12 | } 13 | 14 | .pure-menu-fixed { 15 | position: fixed; 16 | left: 0; 17 | top: 0; 18 | z-index: 3; 19 | } 20 | 21 | .pure-menu-list, 22 | .pure-menu-item { 23 | position: relative; 24 | } 25 | 26 | .pure-menu-list { 27 | list-style: none; 28 | margin: 0; 29 | padding: 0; 30 | } 31 | 32 | .pure-menu-item { 33 | padding: 0; 34 | margin: 0; 35 | height: 100%; 36 | } 37 | 38 | .pure-menu-link, 39 | .pure-menu-heading { 40 | display: block; 41 | text-decoration: none; 42 | white-space: nowrap; 43 | } 44 | 45 | /* HORIZONTAL MENU */ 46 | .pure-menu-horizontal { 47 | width: 100%; 48 | white-space: nowrap; 49 | } 50 | 51 | .pure-menu-horizontal .pure-menu-list { 52 | display: inline-block; 53 | } 54 | 55 | /* Initial menus should be inline-block so that they are horizontal */ 56 | .pure-menu-horizontal .pure-menu-item, 57 | .pure-menu-horizontal .pure-menu-heading, 58 | .pure-menu-horizontal .pure-menu-separator { 59 | display: inline-block; 60 | *display: inline; 61 | zoom: 1; 62 | vertical-align: middle; 63 | } 64 | 65 | /* Submenus should still be display: block; */ 66 | .pure-menu-item .pure-menu-item { 67 | display: block; 68 | } 69 | 70 | .pure-menu-children { 71 | display: none; 72 | position: absolute; 73 | left: 100%; 74 | top: 0; 75 | margin: 0; 76 | padding: 0; 77 | z-index: 3; 78 | } 79 | 80 | .pure-menu-horizontal .pure-menu-children { 81 | left: 0; 82 | top: auto; 83 | width: inherit; 84 | } 85 | 86 | .pure-menu-allow-hover:hover > .pure-menu-children, 87 | .pure-menu-active > .pure-menu-children { 88 | display: block; 89 | position: absolute; 90 | } 91 | 92 | /* Vertical Menus - show the dropdown arrow */ 93 | .pure-menu-has-children > .pure-menu-link:after { 94 | padding-left: 0.5em; 95 | content: "\25B8"; 96 | font-size: small; 97 | } 98 | 99 | /* Horizontal Menus - show the dropdown arrow */ 100 | .pure-menu-horizontal .pure-menu-has-children > .pure-menu-link:after { 101 | content: "\25BE"; 102 | } 103 | 104 | /* scrollable menus */ 105 | .pure-menu-scrollable { 106 | overflow-y: scroll; 107 | overflow-x: hidden; 108 | } 109 | 110 | .pure-menu-scrollable .pure-menu-list { 111 | display: block; 112 | } 113 | 114 | .pure-menu-horizontal.pure-menu-scrollable .pure-menu-list { 115 | display: inline-block; 116 | } 117 | 118 | .pure-menu-horizontal.pure-menu-scrollable { 119 | white-space: nowrap; 120 | overflow-y: hidden; 121 | overflow-x: auto; 122 | -ms-overflow-style: none; 123 | -webkit-overflow-scrolling: touch; 124 | /* a little extra padding for this style to allow for scrollbars */ 125 | padding: .5em 0; 126 | } 127 | 128 | .pure-menu-horizontal.pure-menu-scrollable::-webkit-scrollbar { 129 | display: none; 130 | } 131 | 132 | /* misc default styling */ 133 | 134 | .pure-menu-separator { 135 | background-color: #ccc; 136 | height: 1px; 137 | margin: .3em 0; 138 | } 139 | 140 | .pure-menu-horizontal .pure-menu-separator { 141 | width: 1px; 142 | height: 1.3em; 143 | margin: 0 .3em ; 144 | } 145 | 146 | .pure-menu-heading { 147 | text-transform: uppercase; 148 | color: #565d64; 149 | } 150 | 151 | .pure-menu-link { 152 | color: #777; 153 | } 154 | 155 | .pure-menu-children { 156 | background-color: #fff; 157 | } 158 | 159 | .pure-menu-link, 160 | .pure-menu-disabled, 161 | .pure-menu-heading { 162 | padding: .5em 1em; 163 | } 164 | 165 | .pure-menu-disabled { 166 | opacity: .5; 167 | } 168 | 169 | .pure-menu-disabled .pure-menu-link:hover { 170 | background-color: transparent; 171 | } 172 | 173 | .pure-menu-active > .pure-menu-link, 174 | .pure-menu-link:hover, 175 | .pure-menu-link:focus { 176 | background-color: #eee; 177 | } 178 | 179 | .pure-menu-selected .pure-menu-link, 180 | .pure-menu-selected .pure-menu-link:visited { 181 | color: #000; 182 | } 183 | -------------------------------------------------------------------------------- /p3k/Weather.php: -------------------------------------------------------------------------------- 1 | 'Please provide an api key from openweathermap.org']; 11 | } 12 | 13 | $data = self::_fetch($lat, $lng, $key); 14 | if(!$data) return null; 15 | 16 | if(!property_exists($data, 'current')) 17 | return null; 18 | 19 | $weather = [ 20 | 'description' => null, 21 | 'icon' => [ 22 | 'name' => null 23 | ], 24 | 'temp' => null, 25 | 'feelslike' => null, 26 | 'humidity' => null, 27 | 'wind' => null, 28 | 'pressure' => null, 29 | 'precip_today' => null, 30 | 'timezone' => [ 31 | 'offset' => null, 32 | 'name' => null, 33 | 'abbr' => null 34 | ] 35 | ]; 36 | 37 | $sunny = self::_sunny($data->lat, $data->lon); 38 | 39 | $icon_name = self::_icon_name($data->current->weather[0]->id); 40 | 41 | $weather['sun'] = $sunny; 42 | 43 | $weather['description'] = $data->current->weather[0]->description; 44 | $weather['icon']['name'] = $icon_name; 45 | $weather['temp'] = [ 46 | 'num' => (double)$data->current->temp, 47 | 'unit' => '°F' 48 | ]; 49 | $weather['feelslike'] = [ 50 | 'num' => (double)$data->current->feels_like, 51 | 'unit' => '°F' 52 | ]; 53 | $weather['wind'] = [ 54 | 'num' => $data->current->wind_speed, 55 | 'unit' => 'mph' 56 | ]; 57 | $weather['pressure'] = [ 58 | 'num' => (int)$data->current->pressure, 59 | 'unit' => 'mb' 60 | ]; 61 | $weather['humidity'] = [ 62 | 'num' => round($data->current->humidity), 63 | 'unit' => '%' 64 | ]; 65 | 66 | $weather['timezone']['name'] = $data->timezone; 67 | $weather['timezone']['offset'] = $data->timezone_offset; 68 | 69 | #$weather['raw'] = $current; 70 | 71 | return $weather; 72 | } 73 | 74 | private static function _fetch($lat, $lng, $key) { 75 | $params = [ 76 | 'units' => 'imperial', 77 | 'lat' => $lat, 78 | 'lon' => $lng, 79 | 'appid' => $key, 80 | 'exclude' => 'minutely,hourly,daily,alerts' 81 | ]; 82 | $ch = curl_init(); 83 | curl_setopt($ch, CURLOPT_URL, 'https://api.openweathermap.org/data/3.0/onecall?'.http_build_query($params)); 84 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); 85 | // curl_setopt($ch, CURLOPT_USERAGENT, ''); 86 | curl_setopt($ch, CURLOPT_TIMEOUT, 5); 87 | $result = curl_exec($ch); 88 | 89 | if($result == FALSE) 90 | return FALSE; 91 | 92 | return json_decode($result); 93 | } 94 | 95 | // Returns "day" or "night" depending on whether the sun is up at the given location 96 | private static function _sunny($lat, $lng, $timezone=null) { 97 | // Get the beginning of the current day 98 | 99 | $now = new DateTime(); 100 | if(!$timezone) { 101 | $timezone = \p3k\Timezone::timezone_for_location($lat, $lng); 102 | } 103 | $tz = new DateTimeZone($timezone); 104 | $now->setTimeZone($tz); 105 | $offset = $now->format('Z')/3600; 106 | $now = $now->format('H') + ($now->format('i')/60); 107 | 108 | $sunrise = date_sunrise($now, SUNFUNCS_RET_DOUBLE, $lat, $lng, 90, $offset); 109 | $sunset = date_sunset($now, SUNFUNCS_RET_DOUBLE, $lat, $lng, 90, $offset); 110 | 111 | return [ 112 | 'sunrise' => round($sunrise,2), 113 | 'sunset' => round($sunset,2), 114 | 'now' => round($now,2), 115 | 'light' => ($sunrise < $now && $now < $sunset) ? 'day' : 'night', 116 | 'timezone' => $timezone, 117 | ]; 118 | } 119 | 120 | private static function _icon_name($icon) { 121 | return 'wi-owm-'.$icon; 122 | /* 123 | // A mapping of darksky to weather-icons is here https://erikflowers.github.io/weather-icons/api-list.html 124 | $map = [ 125 | 'clear-day' => 'day-sunny', 126 | 'clear-night' => 'night-clear', 127 | 'rain' => 'rain', 128 | 'snow' => 'snow', 129 | 'sleet' => 'sleet', 130 | 'wind' => 'strong-wind', 131 | 'fog' => 'day-haze', 132 | 'cloudy' => 'cloudy', 133 | 'partly-cloudy-day' => 'day-cloudy', 134 | 'partly-cloudy-night' => 'night-cloudy', 135 | 'hail' => 'day-hail', 136 | 'thunderstorm' => 'thunderstorm', 137 | 'tornado' => 'tornado', 138 | ]; 139 | if(array_key_exists($icon, $map)) { 140 | return 'wi-'.$map[$icon]; 141 | } else { 142 | return false; 143 | } 144 | */ 145 | } 146 | 147 | } 148 | 149 | -------------------------------------------------------------------------------- /public/assets/pure-0.6.0/README.md: -------------------------------------------------------------------------------- 1 | Pure 2 | ==== 3 | [![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/yahoo/pure?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) 4 | 5 | [![Pure](https://cloud.githubusercontent.com/assets/449779/5291099/1b554cca-7b03-11e4-9157-53a12d91b34a.png)][Pure] 6 | 7 | A set of small, responsive CSS modules that you can use in every web project. 8 | [http://purecss.io/][Pure] 9 | 10 | [![Build Status](http://img.shields.io/travis/yahoo/pure.svg?style=flat)][Build Status] 11 | 12 | **Use From the CDN:** 13 | 14 | ```html 15 | 16 | ``` 17 | 18 | Note: You can [customize which Pure modules you need][customize]. 19 | 20 | **Install with Bower:** 21 | 22 | ```shell 23 | $ bower install --save pure 24 | ``` 25 | 26 | 27 | [Pure]: http://purecss.io/ 28 | [Bower]: http://bower.io/ 29 | [Build Status]: https://travis-ci.org/yahoo/pure 30 | [customize]: http://purecss.io/customize/ 31 | 32 | 33 | Features 34 | -------- 35 | 36 | Pure is meant to be a starting point for every website or web app. We take care 37 | of all the CSS work that every site needs, without making it look cookie-cutter: 38 | 39 | * A responsive grid that can be customized to your needs. 40 | 41 | * A solid base built on [Normalize.css][] to fix cross-browser compatibility 42 | issues. 43 | 44 | * Consistently styled buttons that work with `` and `