├── .github └── workflows │ └── build.yml ├── .gitignore ├── CHANGELOG.md ├── Gemfile ├── LICENSE.txt ├── README.md ├── Rakefile ├── lib ├── mapkick-rb.rb ├── mapkick.rb └── mapkick │ ├── engine.rb │ ├── helper.rb │ ├── sinatra.rb │ ├── utils.rb │ └── version.rb ├── licenses └── LICENSE-mapkick-bundle.txt ├── mapkick-rb.gemspec ├── test ├── map_test.rb └── test_helper.rb └── vendor └── assets └── javascripts └── mapkick.bundle.js /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: build 2 | on: [push, pull_request] 3 | jobs: 4 | build: 5 | runs-on: ubuntu-latest 6 | steps: 7 | - uses: actions/checkout@v4 8 | - uses: ruby/setup-ruby@v1 9 | with: 10 | ruby-version: 3.4 11 | bundler-cache: true 12 | - run: bundle exec rake test 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /pkg/ 2 | *.lock 3 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 0.2.0 (2024-10-26) 2 | 3 | - Dropped support for Ruby < 3.1 4 | 5 | ## 0.1.5 (2023-07-24) 6 | 7 | - Updated Mapkick.js to 0.2.6 8 | - Support for area maps is no longer experimental 9 | 10 | ## 0.1.4 (2023-03-11) 11 | 12 | - Updated Mapkick.js to 0.2.5 13 | 14 | ## 0.1.3 (2023-02-13) 15 | 16 | - Updated Mapkick.js to 0.2.4 17 | 18 | ## 0.1.2 (2023-02-08) 19 | 20 | - Updated Mapkick.js to 0.2.3 21 | - Added experimental support for area maps 22 | 23 | ## 0.1.1 (2023-01-24) 24 | 25 | - Updated Mapkick.js to 0.2.2 26 | 27 | ## 0.1.0 (2023-01-19) 28 | 29 | - First release 30 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | 3 | gemspec 4 | 5 | gem "minitest" 6 | gem "rake" 7 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2023-2024 Andrew Kane 2 | 3 | MIT License 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | "Software"), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 20 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 21 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 22 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Mapkick 2 | 3 | Create beautiful JavaScript maps with one line of Ruby. No more fighting with mapping libraries! 4 | 5 | [See it in action](https://chartkick.com/mapkick) 6 | 7 | :fire: For static maps, check out [Mapkick Static](https://github.com/ankane/mapkick-static), and for charts, check out [Chartkick](https://chartkick.com) 8 | 9 | [![Build Status](https://github.com/ankane/mapkick/actions/workflows/build.yml/badge.svg)](https://github.com/ankane/mapkick/actions) 10 | 11 | ## Installation 12 | 13 | Add this line to your application’s Gemfile: 14 | 15 | ```ruby 16 | gem "mapkick-rb" 17 | ``` 18 | 19 | Mapkick uses [Mapbox GL JS v1](https://github.com/mapbox/mapbox-gl-js/tree/v1.13.3). To use tiles from Mapbox, [create a Mapbox account](https://account.mapbox.com/auth/signup/) to get an access token and set `ENV["MAPBOX_ACCESS_TOKEN"]` in your environment (or set `Mapkick.options[:access_token]` in an initializer). 20 | 21 | Then follow the instructions for your JavaScript setup: 22 | 23 | - [Importmap](#importmap) (Rails 7+ default) 24 | - [Bun, esbuild, rollup.js, or Webpack](#bun-esbuild-rollupjs-or-webpack) 25 | - [Sprockets](#sprockets) 26 | 27 | ### Importmap 28 | 29 | In `config/importmap.rb`, add: 30 | 31 | ```ruby 32 | pin "mapkick/bundle", to: "mapkick.bundle.js" 33 | ``` 34 | 35 | And in `app/javascript/application.js`, add: 36 | 37 | ```js 38 | import "mapkick/bundle" 39 | ``` 40 | 41 | ### Bun, esbuild, rollup.js, or Webpack 42 | 43 | Run: 44 | 45 | ```sh 46 | bun add mapkick 47 | # or 48 | yarn add mapkick 49 | ``` 50 | 51 | And in `app/javascript/application.js`, add: 52 | 53 | ```js 54 | import "mapkick/bundle" 55 | ``` 56 | 57 | ### Sprockets 58 | 59 | In `app/assets/javascripts/application.js`, add: 60 | 61 | ```js 62 | //= require mapkick.bundle 63 | ``` 64 | 65 | ## Maps 66 | 67 | Point map 68 | 69 | ```erb 70 | <%= js_map [{latitude: 37.7829, longitude: -122.4190}] %> 71 | ``` 72 | 73 | Area map 74 | 75 | ```erb 76 | <%= area_map [{geometry: {type: "Polygon", coordinates: ...}}] %> 77 | ``` 78 | 79 | ## Data 80 | 81 | Data can be an array 82 | 83 | ```erb 84 | <%= js_map [{latitude: 37.7829, longitude: -122.4190}] %> 85 | ``` 86 | 87 | Or a URL that returns JSON (same format as above) 88 | 89 | ```erb 90 | <%= js_map cities_path %> 91 | ``` 92 | 93 | ### Point Map 94 | 95 | Use `latitude` or `lat` for latitude and `longitude`, `lon`, or `lng` for longitude 96 | 97 | You can specify a label, tooltip, and color for each data point 98 | 99 | ```ruby 100 | { 101 | latitude: ..., 102 | longitude: ..., 103 | label: "Hot Chicken Takeover", 104 | tooltip: "5 stars", 105 | color: "#f84d4d" 106 | } 107 | ``` 108 | 109 | ### Area Map 110 | 111 | Use `geometry` with a GeoJSON `Polygon` or `MultiPolygon` 112 | 113 | You can specify a label, tooltip, and color for each data point 114 | 115 | ```ruby 116 | { 117 | geometry: {type: "Polygon", coordinates: ...}, 118 | label: "Hot Chicken Takeover", 119 | tooltip: "5 stars", 120 | color: "#0090ff" 121 | } 122 | ``` 123 | 124 | ## Options 125 | 126 | Id, width, and height 127 | 128 | ```erb 129 | <%= js_map data, id: "cities-map", width: "800px", height: "500px" %> 130 | ``` 131 | 132 | Marker color 133 | 134 | ```erb 135 | <%= js_map data, markers: {color: "#f84d4d"} %> 136 | ``` 137 | 138 | Show tooltips on click instead of hover 139 | 140 | ```erb 141 | <%= js_map data, tooltips: {hover: false} %> 142 | ``` 143 | 144 | Allow HTML in tooltips (must sanitize manually) 145 | 146 | ```erb 147 | <%= js_map data, tooltips: {html: true} %> 148 | ``` 149 | 150 | Map style 151 | 152 | ```erb 153 | <%= js_map data, style: "mapbox://styles/mapbox/outdoors-v12" %> 154 | ``` 155 | 156 | Zoom and controls 157 | 158 | ```erb 159 | <%= js_map data, zoom: 15, controls: true %> 160 | ``` 161 | 162 | Refresh data from a remote source every `n` seconds 163 | 164 | ```erb 165 | <%= js_map url, refresh: 60 %> 166 | ``` 167 | 168 | Pass options directly to the mapping library 169 | 170 | ```erb 171 | <%= js_map data, library: {hash: true} %> 172 | ``` 173 | 174 | See the documentation for [Mapbox GL JS](https://docs.mapbox.com/mapbox-gl-js/api/map/) for more info 175 | 176 | ### Global Options 177 | 178 | To set options for all of your maps, create an initializer `config/initializers/mapkick.rb` with: 179 | 180 | ```ruby 181 | Mapkick.options[:height] = "400px" 182 | ``` 183 | 184 | ## Sinatra and Padrino 185 | 186 | Download [mapkick.bundle.js](https://raw.githubusercontent.com/ankane/mapkick/master/vendor/assets/javascripts/mapkick.bundle.js) and include it manually. 187 | 188 | ```html 189 | 190 | ``` 191 | 192 | ## History 193 | 194 | View the [changelog](CHANGELOG.md) 195 | 196 | ## Contributing 197 | 198 | Everyone is encouraged to help improve this project. Here are a few ways you can help: 199 | 200 | - [Report bugs](https://github.com/ankane/mapkick/issues) 201 | - Fix bugs and [submit pull requests](https://github.com/ankane/mapkick/pulls) 202 | - Write, clarify, or fix documentation 203 | - Suggest or add new features 204 | 205 | To get started with development: 206 | 207 | ```sh 208 | git clone https://github.com/ankane/mapkick.git 209 | cd mapkick 210 | bundle install 211 | bundle exec rake test 212 | ``` 213 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | require "bundler/gem_tasks" 2 | require "rake/testtask" 3 | 4 | task default: :test 5 | Rake::TestTask.new do |t| 6 | t.libs << "test" 7 | t.pattern = "test/**/*_test.rb" 8 | end 9 | -------------------------------------------------------------------------------- /lib/mapkick-rb.rb: -------------------------------------------------------------------------------- 1 | require_relative "mapkick" 2 | -------------------------------------------------------------------------------- /lib/mapkick.rb: -------------------------------------------------------------------------------- 1 | # stdlib 2 | require "json" 3 | require "erb" 4 | 5 | # modules 6 | require_relative "mapkick/helper" 7 | require_relative "mapkick/utils" 8 | require_relative "mapkick/version" 9 | 10 | # integrations 11 | require_relative "mapkick/engine" if defined?(Rails) 12 | require_relative "mapkick/sinatra" if defined?(Sinatra) 13 | 14 | if defined?(ActiveSupport.on_load) 15 | ActiveSupport.on_load(:action_view) do 16 | include Mapkick::Helper 17 | end 18 | end 19 | 20 | module Mapkick 21 | class Error < StandardError; end 22 | 23 | class << self 24 | attr_accessor :options 25 | end 26 | self.options = {} 27 | end 28 | -------------------------------------------------------------------------------- /lib/mapkick/engine.rb: -------------------------------------------------------------------------------- 1 | module Mapkick 2 | class Engine < ::Rails::Engine 3 | # for assets 4 | 5 | # for importmap 6 | initializer "mapkick.importmap" do |app| 7 | if app.config.respond_to?(:assets) && defined?(Importmap) && defined?(Sprockets) 8 | app.config.assets.precompile << "mapkick.bundle.js" 9 | end 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /lib/mapkick/helper.rb: -------------------------------------------------------------------------------- 1 | module Mapkick 2 | module Helper 3 | def js_map(data_source, **options) 4 | mapkick_map "Map", data_source, **options 5 | end 6 | 7 | def area_map(data_source, **options) 8 | mapkick_map "AreaMap", data_source, **options 9 | end 10 | 11 | private 12 | 13 | # don't break out options since need to merge with default options 14 | def mapkick_map(type, data_source, **options) 15 | options = Mapkick::Utils.deep_merge(Mapkick.options, options) 16 | 17 | @mapkick_map_id ||= 0 18 | element_id = options.delete(:id) || "map-#{@mapkick_map_id += 1}" 19 | 20 | height = (options.delete(:height) || "500px").to_s 21 | width = (options.delete(:width) || "100%").to_s 22 | 23 | nonce = options.fetch(:nonce, true) 24 | options.delete(:nonce) 25 | if nonce == true 26 | # Secure Headers also defines content_security_policy_nonce but it takes an argument 27 | # Rails 5.2 overrides this method, but earlier versions do not 28 | if respond_to?(:content_security_policy_nonce) && (content_security_policy_nonce rescue nil) 29 | # Rails 5.2+ 30 | nonce = content_security_policy_nonce 31 | elsif respond_to?(:content_security_policy_script_nonce) 32 | # Secure Headers 33 | nonce = content_security_policy_script_nonce 34 | else 35 | nonce = nil 36 | end 37 | end 38 | nonce_html = nonce ? " nonce=\"#{ERB::Util.html_escape(nonce)}\"" : nil 39 | 40 | # html vars 41 | html_vars = { 42 | id: element_id, 43 | height: height, 44 | width: width, 45 | # don't delete loading option since it needs to be passed to JS 46 | loading: options[:loading] || "Loading..." 47 | } 48 | 49 | [:height, :width].each do |k| 50 | # limit to alphanumeric and % for simplicity 51 | # this prevents things like calc() but safety is the priority 52 | # dot does not need escaped in square brackets 53 | raise ArgumentError, "Invalid #{k}" unless /\A[a-zA-Z0-9%.]*\z/.match?(html_vars[k]) 54 | end 55 | 56 | html_vars.each_key do |k| 57 | # escape all variables 58 | # we already limit height and width above, but escape for safety as fail-safe 59 | # to prevent XSS injection in worse-case scenario 60 | html_vars[k] = ERB::Util.html_escape(html_vars[k]) 61 | end 62 | 63 | html = %(
%{loading}
) % html_vars 64 | 65 | # access token 66 | access_token = options.delete(:access_token) || options.delete(:accessToken) || ENV["MAPBOX_ACCESS_TOKEN"] 67 | if access_token 68 | # can bypass with string keys 69 | # but should help prevent common errors 70 | if access_token.start_with?("sk.") 71 | raise Mapkick::Error, "Expected public access token" 72 | elsif !access_token.start_with?("pk.") 73 | raise Mapkick::Error, "Invalid access token" 74 | end 75 | options[:accessToken] = access_token 76 | end 77 | 78 | # js vars 79 | js_vars = { 80 | type: type, 81 | id: element_id, 82 | data: data_source, 83 | options: options 84 | } 85 | js_vars.each_key do |k| 86 | js_vars[k] = Mapkick::Utils.json_escape(js_vars[k].to_json) 87 | end 88 | createjs = "new Mapkick[%{type}](%{id}, %{data}, %{options});" % js_vars 89 | 90 | # don't rerun JS on preview 91 | js = <<~JS 92 | 93 | (function() { 94 | if (document.documentElement.hasAttribute("data-turbolinks-preview")) return; 95 | if (document.documentElement.hasAttribute("data-turbo-preview")) return; 96 | 97 | var createMap = function() { #{createjs} }; 98 | if ("Mapkick" in window) { 99 | createMap(); 100 | } else { 101 | window.addEventListener("mapkick:load", createMap, true); 102 | } 103 | })(); 104 | 105 | JS 106 | 107 | html += "\n#{js}" 108 | 109 | html.respond_to?(:html_safe) ? html.html_safe : html 110 | end 111 | end 112 | end 113 | -------------------------------------------------------------------------------- /lib/mapkick/sinatra.rb: -------------------------------------------------------------------------------- 1 | require "sinatra/base" 2 | 3 | class Sinatra::Base 4 | helpers Mapkick::Helper 5 | end 6 | -------------------------------------------------------------------------------- /lib/mapkick/utils.rb: -------------------------------------------------------------------------------- 1 | module Mapkick 2 | module Utils 3 | # https://github.com/rails/rails/blob/master/activesupport/lib/active_support/core_ext/hash/deep_merge.rb 4 | def self.deep_merge(hash_a, hash_b) 5 | hash_a = hash_a.dup 6 | hash_b.each_pair do |k, v| 7 | tv = hash_a[k] 8 | hash_a[k] = tv.is_a?(Hash) && v.is_a?(Hash) ? deep_merge(tv, v) : v 9 | end 10 | hash_a 11 | end 12 | 13 | # from https://github.com/rails/rails/blob/master/activesupport/lib/active_support/core_ext/string/output_safety.rb 14 | JSON_ESCAPE = { "&" => '\u0026', ">" => '\u003e', "<" => '\u003c', "\u2028" => '\u2028', "\u2029" => '\u2029' } 15 | JSON_ESCAPE_REGEXP = /[\u2028\u2029&><]/u 16 | def self.json_escape(s) 17 | if ERB::Util.respond_to?(:json_escape) 18 | ERB::Util.json_escape(s) 19 | else 20 | s.to_s.gsub(JSON_ESCAPE_REGEXP, JSON_ESCAPE) 21 | end 22 | end 23 | end 24 | end 25 | -------------------------------------------------------------------------------- /lib/mapkick/version.rb: -------------------------------------------------------------------------------- 1 | module Mapkick 2 | VERSION = "0.2.0" 3 | end 4 | -------------------------------------------------------------------------------- /licenses/LICENSE-mapkick-bundle.txt: -------------------------------------------------------------------------------- 1 | ================================================================================ 2 | Mapkick.js 0.2.6 3 | ================================================================================ 4 | 5 | Copyright (c) 2017-2023 Andrew Kane 6 | 7 | MIT License 8 | 9 | Permission is hereby granted, free of charge, to any person obtaining 10 | a copy of this software and associated documentation files (the 11 | "Software"), to deal in the Software without restriction, including 12 | without limitation the rights to use, copy, modify, merge, publish, 13 | distribute, sublicense, and/or sell copies of the Software, and to 14 | permit persons to whom the Software is furnished to do so, subject to 15 | the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be 18 | included in all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 24 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 25 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 26 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | 28 | ================================================================================ 29 | @mapbox/geojson-rewind 0.5.0 30 | ================================================================================ 31 | 32 | Copyright (c) 2020, Mapbox 33 | 34 | Permission to use, copy, modify, and/or distribute this software for any 35 | purpose with or without fee is hereby granted, provided that the above 36 | copyright notice and this permission notice appear in all copies. 37 | 38 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 39 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 40 | FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 41 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 42 | LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 43 | OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 44 | PERFORMANCE OF THIS SOFTWARE. 45 | 46 | ================================================================================ 47 | @mapbox/geojson-types 1.0.2 48 | ================================================================================ 49 | 50 | MIT License 51 | 52 | Copyright (c) 2018 Mapbox 53 | 54 | Permission is hereby granted, free of charge, to any person obtaining a copy 55 | of this software and associated documentation files (the "Software"), to deal 56 | in the Software without restriction, including without limitation the rights 57 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 58 | copies of the Software, and to permit persons to whom the Software is 59 | furnished to do so, subject to the following conditions: 60 | 61 | The above copyright notice and this permission notice shall be included in all 62 | copies or substantial portions of the Software. 63 | 64 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 65 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 66 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 67 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 68 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 69 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 70 | SOFTWARE. 71 | 72 | ================================================================================ 73 | @mapbox/jsonlint-lines-primitives 2.0.2 74 | ================================================================================ 75 | 76 | MIT License 77 | 78 | Copyright (C) 2012 Zachary Carter 79 | 80 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 81 | 82 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 83 | 84 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 85 | 86 | ================================================================================ 87 | @mapbox/mapbox-gl-supported 1.5.0 88 | ================================================================================ 89 | 90 | BSD 3-Clause License 91 | 92 | Copyright (c) 2017, Mapbox 93 | All rights reserved. 94 | 95 | Redistribution and use in source and binary forms, with or without 96 | modification, are permitted provided that the following conditions are met: 97 | 98 | * Redistributions of source code must retain the above copyright notice, this 99 | list of conditions and the following disclaimer. 100 | 101 | * Redistributions in binary form must reproduce the above copyright notice, 102 | this list of conditions and the following disclaimer in the documentation 103 | and/or other materials provided with the distribution. 104 | 105 | * Neither the name of the copyright holder nor the names of its 106 | contributors may be used to endorse or promote products derived from 107 | this software without specific prior written permission. 108 | 109 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 110 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 111 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 112 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 113 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 114 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 115 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 116 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 117 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 118 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 119 | 120 | ================================================================================ 121 | @mapbox/point-geometry 0.1.0 122 | ================================================================================ 123 | 124 | Copyright (c) 2015, Mapbox <> 125 | 126 | Permission to use, copy, modify, and/or distribute this software for any 127 | purpose with or without fee is hereby granted, provided that the above 128 | copyright notice and this permission notice appear in all copies. 129 | 130 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 131 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 132 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 133 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 134 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 135 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 136 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 137 | 138 | ================================================================================ 139 | @mapbox/tiny-sdf 1.1.1 140 | ================================================================================ 141 | 142 | Copyright © 2016-2017 Mapbox, Inc. 143 | This code available under the terms of the BSD 2-Clause license. 144 | 145 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 146 | 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 147 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 148 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 149 | 150 | ================================================================================ 151 | @mapbox/unitbezier 0.0.0 152 | ================================================================================ 153 | 154 | BSD-2-Clause 155 | 156 | Copyright (C) 2008 Apple Inc. All Rights Reserved. 157 | 158 | Redistribution and use in source and binary forms, with or without 159 | modification, are permitted provided that the following conditions 160 | are met: 161 | 162 | 1. Redistributions of source code must retain the above copyright 163 | notice, this list of conditions and the following disclaimer. 164 | 2. Redistributions in binary form must reproduce the above copyright 165 | notice, this list of conditions and the following disclaimer in the 166 | documentation and/or other materials provided with the distribution. 167 | 168 | THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY 169 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 170 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 171 | PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR 172 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 173 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 174 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 175 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 176 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 177 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 178 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 179 | 180 | Ported from Webkit 181 | http://svn.webkit.org/repository/webkit/trunk/Source/WebCore/platform/graphics/UnitBezier.h 182 | 183 | ================================================================================ 184 | @mapbox/vector-tile 1.3.1 185 | ================================================================================ 186 | 187 | Copyright (c) 2014, Mapbox 188 | 189 | 190 | All rights reserved. 191 | 192 | Redistribution and use in source and binary forms, with or without modification, 193 | are permitted provided that the following conditions are met: 194 | 195 | * Redistributions of source code must retain the above copyright notice, 196 | this list of conditions and the following disclaimer. 197 | * Redistributions in binary form must reproduce the above copyright notice, 198 | this list of conditions and the following disclaimer in the documentation 199 | and/or other materials provided with the distribution. 200 | * Neither the name of Mapbox nor the names of its contributors 201 | may be used to endorse or promote products derived from this software 202 | without specific prior written permission. 203 | 204 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 205 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 206 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 207 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 208 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 209 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 210 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 211 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 212 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 213 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 214 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 215 | 216 | ================================================================================ 217 | @mapbox/whoots-js 3.1.0 218 | ================================================================================ 219 | 220 | ISC License 221 | 222 | Copyright (c) 2017, Mapbox 223 | 224 | Permission to use, copy, modify, and/or distribute this software for any purpose 225 | with or without fee is hereby granted, provided that the above copyright notice 226 | and this permission notice appear in all copies. 227 | 228 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 229 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 230 | FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 231 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 232 | OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 233 | TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF 234 | THIS SOFTWARE. 235 | 236 | ================================================================================ 237 | buffer-from 1.1.1 238 | ================================================================================ 239 | 240 | MIT License 241 | 242 | Copyright (c) 2016, 2018 Linus Unnebäck 243 | 244 | Permission is hereby granted, free of charge, to any person obtaining a copy 245 | of this software and associated documentation files (the "Software"), to deal 246 | in the Software without restriction, including without limitation the rights 247 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 248 | copies of the Software, and to permit persons to whom the Software is 249 | furnished to do so, subject to the following conditions: 250 | 251 | The above copyright notice and this permission notice shall be included in all 252 | copies or substantial portions of the Software. 253 | 254 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 255 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 256 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 257 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 258 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 259 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 260 | SOFTWARE. 261 | 262 | ================================================================================ 263 | concat-stream 2.0.0 264 | ================================================================================ 265 | 266 | The MIT License 267 | 268 | Copyright (c) 2013 Max Ogden 269 | 270 | Permission is hereby granted, free of charge, 271 | to any person obtaining a copy of this software and 272 | associated documentation files (the "Software"), to 273 | deal in the Software without restriction, including 274 | without limitation the rights to use, copy, modify, 275 | merge, publish, distribute, sublicense, and/or sell 276 | copies of the Software, and to permit persons to whom 277 | the Software is furnished to do so, 278 | subject to the following conditions: 279 | 280 | The above copyright notice and this permission notice 281 | shall be included in all copies or substantial portions of the Software. 282 | 283 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 284 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 285 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 286 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 287 | ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 288 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 289 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 290 | 291 | ================================================================================ 292 | csscolorparser 1.0.3 293 | ================================================================================ 294 | 295 | (c) Dean McNamee , 2012. 296 | 297 | Permission is hereby granted, free of charge, to any person obtaining a copy 298 | of this software and associated documentation files (the "Software"), to 299 | deal in the Software without restriction, including without limitation the 300 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 301 | sell copies of the Software, and to permit persons to whom the Software is 302 | furnished to do so, subject to the following conditions: 303 | 304 | The above copyright notice and this permission notice shall be included in 305 | all copies or substantial portions of the Software. 306 | 307 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 308 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 309 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 310 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 311 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 312 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 313 | IN THE SOFTWARE. 314 | 315 | ================================================================================ 316 | earcut 2.2.2 317 | ================================================================================ 318 | 319 | ISC License 320 | 321 | Copyright (c) 2016, Mapbox 322 | 323 | Permission to use, copy, modify, and/or distribute this software for any purpose 324 | with or without fee is hereby granted, provided that the above copyright notice 325 | and this permission notice appear in all copies. 326 | 327 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 328 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 329 | FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 330 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 331 | OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 332 | TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF 333 | THIS SOFTWARE. 334 | 335 | ================================================================================ 336 | geojson-vt 3.2.1 337 | ================================================================================ 338 | 339 | ISC License 340 | 341 | Copyright (c) 2015, Mapbox 342 | 343 | Permission to use, copy, modify, and/or distribute this software for any purpose 344 | with or without fee is hereby granted, provided that the above copyright notice 345 | and this permission notice appear in all copies. 346 | 347 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 348 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 349 | FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 350 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 351 | OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 352 | TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF 353 | THIS SOFTWARE. 354 | 355 | ================================================================================ 356 | gl-matrix 3.2.1 357 | ================================================================================ 358 | 359 | Copyright (c) 2015-2020, Brandon Jones, Colin MacKenzie IV. 360 | 361 | Permission is hereby granted, free of charge, to any person obtaining a copy 362 | of this software and associated documentation files (the "Software"), to deal 363 | in the Software without restriction, including without limitation the rights 364 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 365 | copies of the Software, and to permit persons to whom the Software is 366 | furnished to do so, subject to the following conditions: 367 | 368 | The above copyright notice and this permission notice shall be included in 369 | all copies or substantial portions of the Software. 370 | 371 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 372 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 373 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 374 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 375 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 376 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 377 | THE SOFTWARE. 378 | 379 | ================================================================================ 380 | grid-index 1.1.0 381 | ================================================================================ 382 | 383 | Copyright (c) 2016, Mapbox 384 | 385 | Permission to use, copy, modify, and/or distribute this software for any purpose 386 | with or without fee is hereby granted, provided that the above copyright notice 387 | and this permission notice appear in all copies. 388 | 389 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 390 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 391 | FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 392 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 393 | OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 394 | TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF 395 | THIS SOFTWARE. 396 | 397 | ================================================================================ 398 | ieee754 1.1.13 399 | ================================================================================ 400 | 401 | Copyright 2008 Fair Oaks Labs, Inc. 402 | 403 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 404 | 405 | 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 406 | 407 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 408 | 409 | 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 410 | 411 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 412 | 413 | ================================================================================ 414 | inherits 2.0.4 415 | ================================================================================ 416 | 417 | The ISC License 418 | 419 | Copyright (c) Isaac Z. Schlueter 420 | 421 | Permission to use, copy, modify, and/or distribute this software for any 422 | purpose with or without fee is hereby granted, provided that the above 423 | copyright notice and this permission notice appear in all copies. 424 | 425 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 426 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 427 | FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 428 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 429 | LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 430 | OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 431 | PERFORMANCE OF THIS SOFTWARE. 432 | 433 | ================================================================================ 434 | kdbush 3.0.0 435 | ================================================================================ 436 | 437 | ISC License 438 | 439 | Copyright (c) 2018, Vladimir Agafonkin 440 | 441 | Permission to use, copy, modify, and/or distribute this software for any purpose 442 | with or without fee is hereby granted, provided that the above copyright notice 443 | and this permission notice appear in all copies. 444 | 445 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 446 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 447 | FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 448 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 449 | OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 450 | TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF 451 | THIS SOFTWARE. 452 | 453 | ================================================================================ 454 | mapbox-gl 1.13.3 455 | ================================================================================ 456 | 457 | Copyright (c) 2020, Mapbox 458 | 459 | All rights reserved. 460 | 461 | Redistribution and use in source and binary forms, with or without modification, 462 | are permitted provided that the following conditions are met: 463 | 464 | * Redistributions of source code must retain the above copyright notice, 465 | this list of conditions and the following disclaimer. 466 | * Redistributions in binary form must reproduce the above copyright notice, 467 | this list of conditions and the following disclaimer in the documentation 468 | and/or other materials provided with the distribution. 469 | * Neither the name of Mapbox GL JS nor the names of its contributors 470 | may be used to endorse or promote products derived from this software 471 | without specific prior written permission. 472 | 473 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 474 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 475 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 476 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 477 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 478 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 479 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 480 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 481 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 482 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 483 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 484 | 485 | 486 | ------------------------------------------------------------------------------- 487 | 488 | Contains code from glfx.js 489 | 490 | Copyright (C) 2011 by Evan Wallace 491 | 492 | Permission is hereby granted, free of charge, to any person obtaining a copy 493 | of this software and associated documentation files (the "Software"), to deal 494 | in the Software without restriction, including without limitation the rights 495 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 496 | copies of the Software, and to permit persons to whom the Software is 497 | furnished to do so, subject to the following conditions: 498 | 499 | The above copyright notice and this permission notice shall be included in 500 | all copies or substantial portions of the Software. 501 | 502 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 503 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 504 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 505 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 506 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 507 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 508 | THE SOFTWARE. 509 | 510 | -------------------------------------------------------------------------------- 511 | 512 | Contains a portion of d3-color https://github.com/d3/d3-color 513 | 514 | Copyright 2010-2016 Mike Bostock 515 | All rights reserved. 516 | 517 | Redistribution and use in source and binary forms, with or without modification, 518 | are permitted provided that the following conditions are met: 519 | 520 | * Redistributions of source code must retain the above copyright notice, this 521 | list of conditions and the following disclaimer. 522 | 523 | * Redistributions in binary form must reproduce the above copyright notice, 524 | this list of conditions and the following disclaimer in the documentation 525 | and/or other materials provided with the distribution. 526 | 527 | * Neither the name of the author nor the names of contributors may be used to 528 | endorse or promote products derived from this software without specific prior 529 | written permission. 530 | 531 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 532 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 533 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 534 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 535 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 536 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 537 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 538 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 539 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 540 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 541 | 542 | ================================================================================ 543 | minimist 1.2.5 544 | ================================================================================ 545 | 546 | This software is released under the MIT license: 547 | 548 | Permission is hereby granted, free of charge, to any person obtaining a copy of 549 | this software and associated documentation files (the "Software"), to deal in 550 | the Software without restriction, including without limitation the rights to 551 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 552 | the Software, and to permit persons to whom the Software is furnished to do so, 553 | subject to the following conditions: 554 | 555 | The above copyright notice and this permission notice shall be included in all 556 | copies or substantial portions of the Software. 557 | 558 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 559 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 560 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 561 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 562 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 563 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 564 | 565 | ================================================================================ 566 | murmurhash-js 1.0.0 567 | ================================================================================ 568 | 569 | License (MIT) 570 | 571 | Copyright (c) 2011 Gary Court 572 | 573 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 574 | 575 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 576 | 577 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 578 | 579 | ================================================================================ 580 | pbf 3.2.1 581 | ================================================================================ 582 | 583 | Copyright (c) 2017, Mapbox 584 | All rights reserved. 585 | 586 | Redistribution and use in source and binary forms, with or without 587 | modification, are permitted provided that the following conditions are met: 588 | 589 | * Redistributions of source code must retain the above copyright notice, this 590 | list of conditions and the following disclaimer. 591 | 592 | * Redistributions in binary form must reproduce the above copyright notice, 593 | this list of conditions and the following disclaimer in the documentation 594 | and/or other materials provided with the distribution. 595 | 596 | * Neither the name of pbf nor the names of its 597 | contributors may be used to endorse or promote products derived from 598 | this software without specific prior written permission. 599 | 600 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 601 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 602 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 603 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 604 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 605 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 606 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 607 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 608 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 609 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 610 | 611 | ================================================================================ 612 | potpack 1.0.1 613 | ================================================================================ 614 | 615 | ISC License 616 | 617 | Copyright (c) 2018, Mapbox 618 | 619 | Permission to use, copy, modify, and/or distribute this software for any purpose 620 | with or without fee is hereby granted, provided that the above copyright notice 621 | and this permission notice appear in all copies. 622 | 623 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 624 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 625 | FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 626 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 627 | OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 628 | TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF 629 | THIS SOFTWARE. 630 | 631 | ================================================================================ 632 | protocol-buffers-schema 3.4.0 633 | ================================================================================ 634 | 635 | The MIT License (MIT) 636 | 637 | Copyright (c) 2014 Mathias Buus 638 | 639 | Permission is hereby granted, free of charge, to any person obtaining a copy 640 | of this software and associated documentation files (the "Software"), to deal 641 | in the Software without restriction, including without limitation the rights 642 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 643 | copies of the Software, and to permit persons to whom the Software is 644 | furnished to do so, subject to the following conditions: 645 | 646 | The above copyright notice and this permission notice shall be included in 647 | all copies or substantial portions of the Software. 648 | 649 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 650 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 651 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 652 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 653 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 654 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 655 | THE SOFTWARE. 656 | 657 | ================================================================================ 658 | quickselect 2.0.0 659 | ================================================================================ 660 | 661 | ISC License 662 | 663 | Copyright (c) 2018, Vladimir Agafonkin 664 | 665 | Permission to use, copy, modify, and/or distribute this software for any purpose 666 | with or without fee is hereby granted, provided that the above copyright notice 667 | and this permission notice appear in all copies. 668 | 669 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 670 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 671 | FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 672 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 673 | OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 674 | TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF 675 | THIS SOFTWARE. 676 | 677 | ================================================================================ 678 | readable-stream 3.6.0 679 | ================================================================================ 680 | 681 | Node.js is licensed for use as follows: 682 | 683 | """ 684 | Copyright Node.js contributors. All rights reserved. 685 | 686 | Permission is hereby granted, free of charge, to any person obtaining a copy 687 | of this software and associated documentation files (the "Software"), to 688 | deal in the Software without restriction, including without limitation the 689 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 690 | sell copies of the Software, and to permit persons to whom the Software is 691 | furnished to do so, subject to the following conditions: 692 | 693 | The above copyright notice and this permission notice shall be included in 694 | all copies or substantial portions of the Software. 695 | 696 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 697 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 698 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 699 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 700 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 701 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 702 | IN THE SOFTWARE. 703 | """ 704 | 705 | This license applies to parts of Node.js originating from the 706 | https://github.com/joyent/node repository: 707 | 708 | """ 709 | Copyright Joyent, Inc. and other Node contributors. All rights reserved. 710 | Permission is hereby granted, free of charge, to any person obtaining a copy 711 | of this software and associated documentation files (the "Software"), to 712 | deal in the Software without restriction, including without limitation the 713 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 714 | sell copies of the Software, and to permit persons to whom the Software is 715 | furnished to do so, subject to the following conditions: 716 | 717 | The above copyright notice and this permission notice shall be included in 718 | all copies or substantial portions of the Software. 719 | 720 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 721 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 722 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 723 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 724 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 725 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 726 | IN THE SOFTWARE. 727 | """ 728 | 729 | ================================================================================ 730 | resolve-protobuf-schema 2.1.0 731 | ================================================================================ 732 | 733 | The MIT License (MIT) 734 | 735 | Copyright (c) 2014 Mathias Buus 736 | 737 | Permission is hereby granted, free of charge, to any person obtaining a copy 738 | of this software and associated documentation files (the "Software"), to deal 739 | in the Software without restriction, including without limitation the rights 740 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 741 | copies of the Software, and to permit persons to whom the Software is 742 | furnished to do so, subject to the following conditions: 743 | 744 | The above copyright notice and this permission notice shall be included in 745 | all copies or substantial portions of the Software. 746 | 747 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 748 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 749 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 750 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 751 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 752 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 753 | THE SOFTWARE. 754 | 755 | ================================================================================ 756 | rw 1.3.3 757 | ================================================================================ 758 | 759 | Copyright (c) 2014-2016, Michael Bostock 760 | All rights reserved. 761 | 762 | Redistribution and use in source and binary forms, with or without 763 | modification, are permitted provided that the following conditions are met: 764 | 765 | * Redistributions of source code must retain the above copyright notice, this 766 | list of conditions and the following disclaimer. 767 | 768 | * Redistributions in binary form must reproduce the above copyright notice, 769 | this list of conditions and the following disclaimer in the documentation 770 | and/or other materials provided with the distribution. 771 | 772 | * The name Michael Bostock may not be used to endorse or promote products 773 | derived from this software without specific prior written permission. 774 | 775 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 776 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 777 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 778 | DISCLAIMED. IN NO EVENT SHALL MICHAEL BOSTOCK BE LIABLE FOR ANY DIRECT, 779 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 780 | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 781 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 782 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 783 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 784 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 785 | 786 | ================================================================================ 787 | safe-buffer 5.2.0 788 | ================================================================================ 789 | 790 | The MIT License (MIT) 791 | 792 | Copyright (c) Feross Aboukhadijeh 793 | 794 | Permission is hereby granted, free of charge, to any person obtaining a copy 795 | of this software and associated documentation files (the "Software"), to deal 796 | in the Software without restriction, including without limitation the rights 797 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 798 | copies of the Software, and to permit persons to whom the Software is 799 | furnished to do so, subject to the following conditions: 800 | 801 | The above copyright notice and this permission notice shall be included in 802 | all copies or substantial portions of the Software. 803 | 804 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 805 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 806 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 807 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 808 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 809 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 810 | THE SOFTWARE. 811 | 812 | ================================================================================ 813 | string_decoder 1.3.0 814 | ================================================================================ 815 | 816 | Node.js is licensed for use as follows: 817 | 818 | """ 819 | Copyright Node.js contributors. All rights reserved. 820 | 821 | Permission is hereby granted, free of charge, to any person obtaining a copy 822 | of this software and associated documentation files (the "Software"), to 823 | deal in the Software without restriction, including without limitation the 824 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 825 | sell copies of the Software, and to permit persons to whom the Software is 826 | furnished to do so, subject to the following conditions: 827 | 828 | The above copyright notice and this permission notice shall be included in 829 | all copies or substantial portions of the Software. 830 | 831 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 832 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 833 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 834 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 835 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 836 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 837 | IN THE SOFTWARE. 838 | """ 839 | 840 | This license applies to parts of Node.js originating from the 841 | https://github.com/joyent/node repository: 842 | 843 | """ 844 | Copyright Joyent, Inc. and other Node contributors. All rights reserved. 845 | Permission is hereby granted, free of charge, to any person obtaining a copy 846 | of this software and associated documentation files (the "Software"), to 847 | deal in the Software without restriction, including without limitation the 848 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 849 | sell copies of the Software, and to permit persons to whom the Software is 850 | furnished to do so, subject to the following conditions: 851 | 852 | The above copyright notice and this permission notice shall be included in 853 | all copies or substantial portions of the Software. 854 | 855 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 856 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 857 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 858 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 859 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 860 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 861 | IN THE SOFTWARE. 862 | """ 863 | 864 | ================================================================================ 865 | supercluster 7.1.0 866 | ================================================================================ 867 | 868 | ISC License 869 | 870 | Copyright (c) 2016, Mapbox 871 | 872 | Permission to use, copy, modify, and/or distribute this software for any purpose 873 | with or without fee is hereby granted, provided that the above copyright notice 874 | and this permission notice appear in all copies. 875 | 876 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 877 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 878 | FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 879 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 880 | OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 881 | TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF 882 | THIS SOFTWARE. 883 | 884 | ================================================================================ 885 | tinyqueue 2.0.3 886 | ================================================================================ 887 | 888 | ISC License 889 | 890 | Copyright (c) 2017, Vladimir Agafonkin 891 | 892 | Permission to use, copy, modify, and/or distribute this software for any purpose 893 | with or without fee is hereby granted, provided that the above copyright notice 894 | and this permission notice appear in all copies. 895 | 896 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 897 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 898 | FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 899 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 900 | OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 901 | TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF 902 | THIS SOFTWARE. 903 | 904 | ================================================================================ 905 | typedarray 0.0.6 906 | ================================================================================ 907 | 908 | /* 909 | Copyright (c) 2010, Linden Research, Inc. 910 | Copyright (c) 2012, Joshua Bell 911 | 912 | Permission is hereby granted, free of charge, to any person obtaining a copy 913 | of this software and associated documentation files (the "Software"), to deal 914 | in the Software without restriction, including without limitation the rights 915 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 916 | copies of the Software, and to permit persons to whom the Software is 917 | furnished to do so, subject to the following conditions: 918 | 919 | The above copyright notice and this permission notice shall be included in 920 | all copies or substantial portions of the Software. 921 | 922 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 923 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 924 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 925 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 926 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 927 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 928 | THE SOFTWARE. 929 | $/LicenseInfo$ 930 | */ 931 | 932 | // Original can be found at: 933 | // https://bitbucket.org/lindenlab/llsd 934 | // Modifications by Joshua Bell inexorabletash@gmail.com 935 | // https://github.com/inexorabletash/polyfill 936 | 937 | // ES3/ES5 implementation of the Krhonos Typed Array Specification 938 | // Ref: http://www.khronos.org/registry/typedarray/specs/latest/ 939 | // Date: 2011-02-01 940 | // 941 | // Variations: 942 | // * Allows typed_array.get/set() as alias for subscripts (typed_array[]) 943 | 944 | ================================================================================ 945 | util-deprecate 1.0.2 946 | ================================================================================ 947 | 948 | (The MIT License) 949 | 950 | Copyright (c) 2014 Nathan Rajlich 951 | 952 | Permission is hereby granted, free of charge, to any person 953 | obtaining a copy of this software and associated documentation 954 | files (the "Software"), to deal in the Software without 955 | restriction, including without limitation the rights to use, 956 | copy, modify, merge, publish, distribute, sublicense, and/or sell 957 | copies of the Software, and to permit persons to whom the 958 | Software is furnished to do so, subject to the following 959 | conditions: 960 | 961 | The above copyright notice and this permission notice shall be 962 | included in all copies or substantial portions of the Software. 963 | 964 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 965 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 966 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 967 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 968 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 969 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 970 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 971 | OTHER DEALINGS IN THE SOFTWARE. 972 | 973 | ================================================================================ 974 | vt-pbf 3.1.1 975 | ================================================================================ 976 | 977 | The MIT License (MIT) 978 | 979 | Copyright (c) 2015 Anand Thakker 980 | 981 | Permission is hereby granted, free of charge, to any person obtaining a copy 982 | of this software and associated documentation files (the "Software"), to deal 983 | in the Software without restriction, including without limitation the rights 984 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 985 | copies of the Software, and to permit persons to whom the Software is 986 | furnished to do so, subject to the following conditions: 987 | 988 | The above copyright notice and this permission notice shall be included in all 989 | copies or substantial portions of the Software. 990 | 991 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 992 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 993 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 994 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 995 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 996 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 997 | SOFTWARE. 998 | 999 | -------------------------------------------------------------------------------- 1000 | 1001 | Contains geojson_wrapper.js from https://github.com/mapbox/mapbox-gl-js 1002 | 1003 | Copyright (c) 2014, Mapbox 1004 | 1005 | All rights reserved. 1006 | 1007 | Redistribution and use in source and binary forms, with or without modification, 1008 | are permitted provided that the following conditions are met: 1009 | 1010 | * Redistributions of source code must retain the above copyright notice, 1011 | this list of conditions and the following disclaimer. 1012 | * Redistributions in binary form must reproduce the above copyright notice, 1013 | this list of conditions and the following disclaimer in the documentation 1014 | and/or other materials provided with the distribution. 1015 | * Neither the name of Mapbox GL JS nor the names of its contributors 1016 | may be used to endorse or promote products derived from this software 1017 | without specific prior written permission. 1018 | 1019 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1020 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1021 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1022 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 1023 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 1024 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 1025 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 1026 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 1027 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 1028 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 1029 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 1030 | -------------------------------------------------------------------------------- /mapkick-rb.gemspec: -------------------------------------------------------------------------------- 1 | require_relative "lib/mapkick/version" 2 | 3 | Gem::Specification.new do |spec| 4 | spec.name = "mapkick-rb" 5 | spec.version = Mapkick::VERSION 6 | spec.summary = "Create beautiful JavaScript maps with one line of Ruby" 7 | spec.homepage = "https://chartkick.com/mapkick" 8 | spec.license = "MIT" 9 | 10 | spec.author = "Andrew Kane" 11 | spec.email = "andrew@ankane.org" 12 | 13 | spec.files = Dir["*.{md,txt}", "{lib,licenses,vendor}/**/*"] 14 | spec.require_path = "lib" 15 | 16 | spec.required_ruby_version = ">= 3.1" 17 | end 18 | -------------------------------------------------------------------------------- /test/map_test.rb: -------------------------------------------------------------------------------- 1 | require_relative "test_helper" 2 | 3 | class MapTest < Minitest::Test 4 | include Mapkick::Helper 5 | 6 | def setup 7 | @data = [{latitude: 1.23, longitude: 4.56}] 8 | end 9 | 10 | def test_js_map 11 | assert_map js_map(@data) 12 | end 13 | 14 | def test_area_map 15 | assert_map area_map([]) 16 | end 17 | 18 | def test_escape_data 19 | bad_data = "" 20 | assert_match "\\u003cscript\\u003e", js_map(bad_data) 21 | refute_match ""} 26 | assert_match "\\u003cscript\\u003e", js_map([], **bad_options) 27 | refute_match "