diff --git a/flutter_map/lib/flutter_map.dart b/flutter_map/lib/flutter_map.dart index b87733c2c..e59c7ec4d 100644 --- a/flutter_map/lib/flutter_map.dart +++ b/flutter_map/lib/flutter_map.dart @@ -1,8 +1,11 @@ library leaflet_flutter; +import 'dart:async'; + import 'package:flutter/widgets.dart'; import 'package:flutter/material.dart'; import 'package:flutter_map/flutter_map.dart'; +import 'package:flutter_map/src/core/point.dart'; import 'package:flutter_map/src/geo/crs/crs.dart'; import 'package:flutter_map/src/map/flutter_map_state.dart'; import 'package:flutter_map/src/map/map.dart'; @@ -13,6 +16,8 @@ export 'src/layer/tile_layer.dart'; export 'src/layer/marker_layer.dart'; export 'src/layer/polyline_layer.dart'; export 'src/geo/crs/crs.dart'; +export 'src/geo/latlng_bounds.dart'; +export 'package:flutter_map/src/core/point.dart'; class FlutterMap extends StatefulWidget { /// A set of layers' options to used to create the layers on the map @@ -45,11 +50,20 @@ class FlutterMap extends StatefulWidget { abstract class MapController { /// Moves the map to a specific location and zoom level void move(LatLng center, double zoom); + void fitBounds( + LatLngBounds bounds, { + FitBoundsOptions options, + }); + bool get ready; + Future get onReady; + LatLng get center; + double get zoom; factory MapController() => new MapControllerImpl(); } typedef TapCallback(LatLng point); +typedef PositionCallback(MapPosition position); class MapOptions { final Crs crs; @@ -60,6 +74,7 @@ class MapOptions { final bool debug; final bool interactive; final TapCallback onTap; + final PositionCallback onPositionChanged; LatLng center; MapOptions({ @@ -72,7 +87,26 @@ class MapOptions { this.debug = false, this.interactive = true, this.onTap, + this.onPositionChanged, }) { if (center == null) center = new LatLng(50.5, 30.51); } } + +class FitBoundsOptions { + final Point padding; + final double maxZoom; + final double zoom; + + const FitBoundsOptions({ + this.padding = const Point(0.0, 0.0), + this.maxZoom = 17.0, + this.zoom, + }); +} + +class MapPosition { + final LatLng center; + final double zoom; + MapPosition({this.center, this.zoom}); +} diff --git a/flutter_map/lib/src/core/bounds.dart b/flutter_map/lib/src/core/bounds.dart index 082fa4d1e..f4f8f8489 100644 --- a/flutter_map/lib/src/core/bounds.dart +++ b/flutter_map/lib/src/core/bounds.dart @@ -37,5 +37,9 @@ class Bounds { ); } + Point get size { + return this.max - this.min; + } + String toString() => "Bounds($min, $max)"; } diff --git a/flutter_map/lib/src/core/center_zoom.dart b/flutter_map/lib/src/core/center_zoom.dart new file mode 100644 index 000000000..3575d7eb4 --- /dev/null +++ b/flutter_map/lib/src/core/center_zoom.dart @@ -0,0 +1,7 @@ +import 'package:latlong/latlong.dart'; + +class CenterZoom { + final LatLng center; + final double zoom; + CenterZoom({this.center, this.zoom}); +} \ No newline at end of file diff --git a/flutter_map/lib/src/geo/crs/crs.dart b/flutter_map/lib/src/geo/crs/crs.dart index 8306cf5fd..953cc9446 100644 --- a/flutter_map/lib/src/geo/crs/crs.dart +++ b/flutter_map/lib/src/geo/crs/crs.dart @@ -37,6 +37,10 @@ abstract class Crs { return 256 * math.pow(2, zoom); } + num zoom(double scale) { + return math.log(scale / 256) / math.ln2; + } + Bounds getProjectedBounds(double zoom) { if (this.infinite) return null; diff --git a/flutter_map/lib/src/geo/latlng_bounds.dart b/flutter_map/lib/src/geo/latlng_bounds.dart index b53564e25..05839a533 100644 --- a/flutter_map/lib/src/geo/latlng_bounds.dart +++ b/flutter_map/lib/src/geo/latlng_bounds.dart @@ -4,12 +4,15 @@ import 'package:latlong/latlong.dart'; class LatLngBounds { LatLng sw; LatLng ne; - LatLngBounds(LatLng corner1, LatLng corner2) { + LatLngBounds([LatLng corner1, LatLng corner2]) { extend(corner1); extend(corner2); } void extend(LatLng latlng) { + if (latlng == null) { + return; + } _extend(latlng, latlng); } @@ -28,4 +31,18 @@ class LatLngBounds { ne.longitude = math.max(ne2.longitude, ne.longitude); } } + + double get west => southWest.longitude; + double get south => southWest.latitude; + double get east => northEast.longitude; + double get north => northEast.latitude; + + LatLng get southWest => sw; + LatLng get northEast => ne; + LatLng get northWest => new LatLng(north, west); + LatLng get southEast => new LatLng(south, east); + + bool get isValid { + return sw != null && ne != null; + } } diff --git a/flutter_map/lib/src/layer/tile_layer.dart b/flutter_map/lib/src/layer/tile_layer.dart index a2787735b..0c9ffb4c2 100644 --- a/flutter_map/lib/src/layer/tile_layer.dart +++ b/flutter_map/lib/src/layer/tile_layer.dart @@ -1,5 +1,3 @@ -import 'dart:typed_data'; - import 'package:flutter/material.dart'; import 'package:flutter/widgets.dart'; import 'package:latlong/latlong.dart'; diff --git a/flutter_map/lib/src/map/map.dart b/flutter_map/lib/src/map/map.dart index a9e4d53a2..b4d5b76c7 100644 --- a/flutter_map/lib/src/map/map.dart +++ b/flutter_map/lib/src/map/map.dart @@ -1,19 +1,43 @@ import 'dart:async'; +import 'dart:math' as math; +import 'package:flutter_map/src/core/center_zoom.dart'; import 'package:latlong/latlong.dart'; import 'package:flutter_map/flutter_map.dart'; import 'package:flutter_map/src/core/bounds.dart'; import 'package:flutter_map/src/core/point.dart'; class MapControllerImpl implements MapController { - MapState state; + Completer _readyCompleter = new Completer(); + MapState _state; + + Future get onReady => _readyCompleter.future; + void set state(MapState state) { + _state = state; + if (!_readyCompleter.isCompleted) { + _readyCompleter.complete(); + } + } void move(LatLng center, double zoom) { - state.move(center, zoom); + _state.move(center, zoom); } + + void fitBounds( + LatLngBounds bounds, { + FitBoundsOptions options = + const FitBoundsOptions(padding: const Point(24.0, 24.0)), + }) { + _state.fitBounds(bounds, options); + } + + bool get ready => _state != null; + + LatLng get center => _state.center; + double get zoom => _state.zoom; } -class MapState { +class MapState { final MapOptions options; final StreamController _onMoveSink; @@ -60,6 +84,18 @@ class MapState { _lastCenter = center; _pixelOrigin = getNewPixelOrigin(center); _onMoveSink.add(null); + + if (options.onPositionChanged != null) { + options.onPositionChanged(new MapPosition(center: center, zoom: zoom)); + } + } + + void fitBounds(LatLngBounds bounds, FitBoundsOptions options) { + if (!bounds.isValid) { + throw ("Bounds are not valid."); + } + var target = _getBoundsCenterZoom(bounds, options); + move(target.center, target.zoom); } LatLng getCenter() { @@ -69,6 +105,42 @@ class MapState { return layerPointToLatLng(_centerLayerPoint); } + CenterZoom _getBoundsCenterZoom( + LatLngBounds bounds, FitBoundsOptions options) { + var paddingTL = options.padding; + var paddingBR = options.padding; + + var zoom = getBoundsZoom(bounds, paddingTL + paddingBR, inside: false); + zoom = math.min(options.maxZoom, zoom); + + var paddingOffset = (paddingBR - paddingTL) / 2; + var swPoint = project(bounds.southWest, zoom); + var nePoint = project(bounds.northEast, zoom); + var center = unproject((swPoint + nePoint) / 2 + paddingOffset, zoom); + return new CenterZoom( + center: center, + zoom: zoom, + ); + } + + double getBoundsZoom(LatLngBounds bounds, Point padding, + {bool inside = false}) { + var zoom = this.zoom ?? 0.0; + var min = this.options.minZoom ?? 0.0; + var max = this.options.maxZoom ?? double.infinity; + var nw = bounds.northWest; + var se = bounds.southEast; + var size = this.size - padding; + var boundsSize = new Bounds(project(se, zoom), project(nw, zoom)).size; + var scaleX = size.x / boundsSize.x; + var scaleY = size.y / boundsSize.y; + var scale = inside ? math.max(scaleX, scaleY) : math.min(scaleX, scaleY); + + zoom = getScaleZoom(scale, zoom); + + return math.max(min, math.min(max, zoom)); + } + Point project(LatLng latlng, [double zoom]) { if (zoom == null) { zoom = _zoom; @@ -97,6 +169,12 @@ class MapState { return crs.scale(toZoom) / crs.scale(fromZoom); } + double getScaleZoom(double scale, double fromZoom) { + var crs = options.crs; + fromZoom = fromZoom == null ? _zoom : fromZoom; + return crs.zoom(scale * crs.scale(fromZoom)); + } + Bounds getPixelWorldBounds(double zoom) { return options.crs.getProjectedBounds(zoom == null ? _zoom : zoom); } diff --git a/flutter_map/pubspec.yaml b/flutter_map/pubspec.yaml index e5a03af18..6a5564d5a 100644 --- a/flutter_map/pubspec.yaml +++ b/flutter_map/pubspec.yaml @@ -13,5 +13,5 @@ dependencies: sdk: flutter latlong: ^0.4.0 tuple: ^1.0.0 - quiver: ^0.28.0 + quiver: ^0.29.0 transparent_image: ^0.1.0 diff --git a/flutter_map_example/ios/Flutter/flutter_assets/LICENSE b/flutter_map_example/ios/Flutter/flutter_assets/LICENSE index c8064d0a2..1cb0530b6 100644 --- a/flutter_map_example/ios/Flutter/flutter_assets/LICENSE +++ b/flutter_map_example/ios/Flutter/flutter_assets/LICENSE @@ -130,195 +130,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- boringssl -27287883 - -OpenSSL License - - ==================================================================== - Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - 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. - - 3. All advertising materials mentioning features or use of this - software must display the following acknowledgment: - "This product includes software developed by the OpenSSL Project - for use in the OpenSSL Toolkit. (http://www.openssl.org/)" - - 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - endorse or promote products derived from this software without - prior written permission. For written permission, please contact - openssl-core@openssl.org. - - 5. Products derived from this software may not be called "OpenSSL" - nor may "OpenSSL" appear in their names without prior written - permission of the OpenSSL Project. - - 6. Redistributions of any form whatsoever must retain the following - acknowledgment: - "This product includes software developed by the OpenSSL Project - for use in the OpenSSL Toolkit (http://www.openssl.org/)" - - THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - EXPRESSED 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 OpenSSL PROJECT OR - ITS 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. - ==================================================================== - - This product includes cryptographic software written by Eric Young - (eay@cryptsoft.com). This product includes software written by Tim - Hudson (tjh@cryptsoft.com). - -Original SSLeay License - -* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) -* All rights reserved. - -* This package is an SSL implementation written -* by Eric Young (eay@cryptsoft.com). -* The implementation was written so as to conform with Netscapes SSL. - -* This library is free for commercial and non-commercial use as long as -* the following conditions are aheared to. The following conditions -* apply to all code found in this distribution, be it the RC4, RSA, -* lhash, DES, etc., code; not just the SSL code. The SSL documentation -* included with this distribution is covered by the same copyright terms -* except that the holder is Tim Hudson (tjh@cryptsoft.com). - -* Copyright remains Eric Young's, and as such any Copyright notices in -* the code are not to be removed. -* If this package is used in a product, Eric Young should be given attribution -* as the author of the parts of the library used. -* This can be in the form of a textual message at program startup or -* in documentation (online or textual) provided with the package. - -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* 1. Redistributions of source code must retain the copyright -* notice, this list of conditions and the following disclaimer. -* 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. -* 3. All advertising materials mentioning features or use of this software -* must display the following acknowledgement: -* "This product includes cryptographic software written by -* Eric Young (eay@cryptsoft.com)" -* The word 'cryptographic' can be left out if the rouines from the library -* being used are not cryptographic related :-). -* 4. If you include any Windows specific code (or a derivative thereof) from -* the apps directory (application code) you must include an acknowledgement: -* "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - -* THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``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 AUTHOR 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. - -* The licence and distribution terms for any publically available version or -* derivative of this code cannot be changed. i.e. this code cannot simply be -* copied and put under another distribution licence -* [including the GNU Public Licence.] - -ISC license used for completely new code in BoringSSL: - -/* Copyright (c) 2015, Google Inc. - - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY - * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -Some files from Intel carry the following license: - -# Copyright (c) 2012, Intel Corporation - -# All rights reserved. - -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: - -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. - -# * 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. - -# * Neither the name of the Intel Corporation nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. - -# THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION ""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 INTEL CORPORATION 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. - -The code in third_party/fiat carries the MIT license: - -Copyright (c) 2015-2016 the fiat-crypto authors (see -https://github.com/mit-plv/fiat-crypto/blob/master/AUTHORS). - -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: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -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. --------------------------------------------------------------------------------- -boringssl - Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) All rights reserved. @@ -2100,40 +1911,6 @@ OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- boringssl -Copyright (c) 2012, Intel Corporation - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -* Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -* 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. - -* Neither the name of the Intel Corporation nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION ""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 INTEL CORPORATION 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. --------------------------------------------------------------------------------- -boringssl - Copyright (c) 2013 The OpenSSL Project. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -2237,22 +2014,6 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -------------------------------------------------------------------------------- boringssl -Copyright (c) 2014, Intel Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION -OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN -CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. --------------------------------------------------------------------------------- -boringssl - Copyright (c) 2015 The OpenSSL Project. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -2530,6 +2291,37 @@ OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- boringssl +Copyright 2003 Google Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * 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. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +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 +OWNER 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. +-------------------------------------------------------------------------------- +boringssl + Copyright 2005 Nokia. All rights reserved. The portions of the attached software ("Contribution") is developed by @@ -2557,100 +2349,22 @@ OTHERWISE. -------------------------------------------------------------------------------- boringssl -Copyright 2007-2016 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2005, Google Inc. +All rights reserved. -Licensed under the OpenSSL license (the "License"). You may not use -this file except in compliance with the License. You can obtain a copy -in the file LICENSE in the source distribution or at -https://www.openssl.org/source/license.html --------------------------------------------------------------------------------- -boringssl +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: -Copyright 2012-2016 The OpenSSL Project Authors. All Rights Reserved. - -Licensed under the OpenSSL license (the "License"). You may not use -this file except in compliance with the License. You can obtain a copy -in the file LICENSE in the source distribution or at -https://www.openssl.org/source/license.html --------------------------------------------------------------------------------- -boringssl - -Copyright 2014-2016 The OpenSSL Project Authors. All Rights Reserved. - -Licensed under the OpenSSL license (the "License"). You may not use -this file except in compliance with the License. You can obtain a copy -in the file LICENSE in the source distribution or at -https://www.openssl.org/source/license.html --------------------------------------------------------------------------------- -boringssl - -Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved. - -Licensed under the OpenSSL license (the "License"). You may not use -this file except in compliance with the License. You can obtain a copy -in the file LICENSE in the source distribution or at -https://www.openssl.org/source/license.html --------------------------------------------------------------------------------- -boringssl - -Copyright 2016 Brian Smith. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION -OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN -CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. --------------------------------------------------------------------------------- -boringssl - -The MIT License (MIT) - -Copyright (c) 2015-2016 the fiat-crypto authors (see -https://github.com/mit-plv/fiat-crypto/blob/master/AUTHORS). - -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: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -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. --------------------------------------------------------------------------------- -boringssl -gtest - -Copyright 2003 Google Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * 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. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * 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. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT @@ -2665,9 +2379,8 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- boringssl -gtest -Copyright 2005, Google Inc. +Copyright 2006, Google Inc. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -2697,9 +2410,8 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- boringssl -gtest -Copyright 2006, Google Inc. +Copyright 2007, Google Inc. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -2729,39 +2441,15 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- boringssl -gtest - -Copyright 2007, Google Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * 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. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. +Copyright 2007-2016 The OpenSSL Project Authors. All Rights Reserved. -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 -OWNER 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. +Licensed under the OpenSSL license (the "License"). You may not use +this file except in compliance with the License. You can obtain a copy +in the file LICENSE in the source distribution or at +https://www.openssl.org/source/license.html -------------------------------------------------------------------------------- boringssl -gtest Copyright 2008 Google Inc. All Rights Reserved. @@ -2793,7 +2481,6 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- boringssl -gtest Copyright 2008, Google Inc. All rights reserved. @@ -2825,7 +2512,6 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- boringssl -gtest Copyright 2009 Google Inc. All Rights Reserved. @@ -2857,7 +2543,6 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- boringssl -gtest Copyright 2009 Google Inc. All Rights Reserved. @@ -2888,7 +2573,6 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- boringssl -gtest Copyright 2009, Google Inc. All rights reserved. @@ -2920,7 +2604,44 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- boringssl -gtest + +Copyright 2012-2016 The OpenSSL Project Authors. All Rights Reserved. + +Licensed under the OpenSSL license (the "License"). You may not use +this file except in compliance with the License. You can obtain a copy +in the file LICENSE in the source distribution or at +https://www.openssl.org/source/license.html +-------------------------------------------------------------------------------- +boringssl + +Copyright 2013-2016 The OpenSSL Project Authors. All Rights Reserved. +Copyright (c) 2012, Intel Corporation. All Rights Reserved. + +Licensed under the OpenSSL license (the "License"). You may not use +this file except in compliance with the License. You can obtain a copy +in the file LICENSE in the source distribution or at +https://www.openssl.org/source/license.html +-------------------------------------------------------------------------------- +boringssl + +Copyright 2014-2016 The OpenSSL Project Authors. All Rights Reserved. + +Licensed under the OpenSSL license (the "License"). You may not use +this file except in compliance with the License. You can obtain a copy +in the file LICENSE in the source distribution or at +https://www.openssl.org/source/license.html +-------------------------------------------------------------------------------- +boringssl + +Copyright 2014-2016 The OpenSSL Project Authors. All Rights Reserved. +Copyright (c) 2014, Intel Corporation. All Rights Reserved. + +Licensed under the OpenSSL license (the "License"). You may not use +this file except in compliance with the License. You can obtain a copy +in the file LICENSE in the source distribution or at +https://www.openssl.org/source/license.html +-------------------------------------------------------------------------------- +boringssl Copyright 2015, Google Inc. All rights reserved. @@ -2951,6 +2672,209 @@ 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. -------------------------------------------------------------------------------- +boringssl + +Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved. + +Licensed under the OpenSSL license (the "License"). You may not use +this file except in compliance with the License. You can obtain a copy +in the file LICENSE in the source distribution or at +https://www.openssl.org/source/license.html +-------------------------------------------------------------------------------- +boringssl + +Copyright 2016 Brian Smith. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION +OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +-------------------------------------------------------------------------------- +boringssl + +OpenSSL License + + ==================================================================== + Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + 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. + + 3. All advertising materials mentioning features or use of this + software must display the following acknowledgment: + "This product includes software developed by the OpenSSL Project + for use in the OpenSSL Toolkit. (http://www.openssl.org/)" + + 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to + endorse or promote products derived from this software without + prior written permission. For written permission, please contact + openssl-core@openssl.org. + + 5. Products derived from this software may not be called "OpenSSL" + nor may "OpenSSL" appear in their names without prior written + permission of the OpenSSL Project. + + 6. Redistributions of any form whatsoever must retain the following + acknowledgment: + "This product includes software developed by the OpenSSL Project + for use in the OpenSSL Toolkit (http://www.openssl.org/)" + + THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY + EXPRESSED 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 OpenSSL PROJECT OR + ITS 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. + ==================================================================== + + This product includes cryptographic software written by Eric Young + (eay@cryptsoft.com). This product includes software written by Tim + Hudson (tjh@cryptsoft.com). + +Original SSLeay License + +* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) +* All rights reserved. + +* This package is an SSL implementation written +* by Eric Young (eay@cryptsoft.com). +* The implementation was written so as to conform with Netscapes SSL. + +* This library is free for commercial and non-commercial use as long as +* the following conditions are aheared to. The following conditions +* apply to all code found in this distribution, be it the RC4, RSA, +* lhash, DES, etc., code; not just the SSL code. The SSL documentation +* included with this distribution is covered by the same copyright terms +* except that the holder is Tim Hudson (tjh@cryptsoft.com). + +* Copyright remains Eric Young's, and as such any Copyright notices in +* the code are not to be removed. +* If this package is used in a product, Eric Young should be given attribution +* as the author of the parts of the library used. +* This can be in the form of a textual message at program startup or +* in documentation (online or textual) provided with the package. + +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: +* 1. Redistributions of source code must retain the copyright +* notice, this list of conditions and the following disclaimer. +* 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. +* 3. All advertising materials mentioning features or use of this software +* must display the following acknowledgement: +* "This product includes cryptographic software written by +* Eric Young (eay@cryptsoft.com)" +* The word 'cryptographic' can be left out if the rouines from the library +* being used are not cryptographic related :-). +* 4. If you include any Windows specific code (or a derivative thereof) from +* the apps directory (application code) you must include an acknowledgement: +* "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" + +* THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``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 AUTHOR 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. + +* The licence and distribution terms for any publically available version or +* derivative of this code cannot be changed. i.e. this code cannot simply be +* copied and put under another distribution licence +* [including the GNU Public Licence.] + +ISC license used for completely new code in BoringSSL: + +/* Copyright (c) 2015, Google Inc. + + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION + * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +The code in third_party/fiat carries the MIT license: + +Copyright (c) 2015-2016 the fiat-crypto authors (see +https://github.com/mit-plv/fiat-crypto/blob/master/AUTHORS). + +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: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +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. +-------------------------------------------------------------------------------- +boringssl + +The MIT License (MIT) + +Copyright (c) 2015-2016 the fiat-crypto authors (see +https://github.com/mit-plv/fiat-crypto/blob/master/AUTHORS). + +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: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +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. +-------------------------------------------------------------------------------- browser charcode glob @@ -3164,7 +3088,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- dart -Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file +Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file for details. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -3193,7 +3117,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- dart -Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file +Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file for details. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -3222,7 +3146,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- dart -Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file +Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file for details. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -3251,7 +3175,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- dart -Copyright 2009 The Go Authors. All rights reserved. +Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file +for details. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are @@ -3279,7 +3204,38 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- dart -Copyright 2012, the Dart project authors. All rights reserved. +Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file +for details. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * 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. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. +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 +OWNER 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. +-------------------------------------------------------------------------------- +dart + +Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file +for details. All rights reserved. + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -3305,10 +3261,8 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- dart -observatory_pub_packages -Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file -for details. All rights reserved. +Copyright 2009 The Go Authors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are @@ -3335,11 +3289,8 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- dart -observatory_pub_packages - -Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file -for details. All rights reserved. +Copyright 2012, the Dart project authors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -3367,7 +3318,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. dart observatory_pub_packages -Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file +Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file for details. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -8864,6 +8815,36 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- engine +Copyright 2018 The Flutter Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * 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. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +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 +OWNER 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. +-------------------------------------------------------------------------------- +engine + GNU LIBRARY GENERAL PUBLIC LICENSE Version 2, June 1991 @@ -9340,220 +9321,11 @@ necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! --------------------------------------------------------------------------------- -engine -etc1 -observatory_pub_packages -skia -txt -vulkan - -Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - -Copyright [yyyy] [name of copyright owner] - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! -------------------------------------------------------------------------------- engine garnet @@ -9705,6 +9477,38 @@ distribution. contributors may be used to endorse or promote products derived from this software without specific prior written permission. +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 +OWNER 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. +-------------------------------------------------------------------------------- +engine +garnet +topaz + +Copyright 2018 The Fuchsia Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * 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. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + 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 @@ -10251,43 +10055,251 @@ necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. - , 1 April 1990 - Ty Coon, President of Vice + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! +-------------------------------------------------------------------------------- +engine +icu +skia +topaz + +Copyright 2016 The Chromium Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * 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. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +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 +OWNER 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. +-------------------------------------------------------------------------------- +engine +observatory_pub_packages +skia +txt +vulkan + +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS -That's all there is to it! --------------------------------------------------------------------------------- -engine -icu -skia -topaz +APPENDIX: How to apply the Apache License to your work. -Copyright 2016 The Chromium Authors. All rights reserved. + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: +Copyright [yyyy] [name of copyright owner] - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * 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. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at -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 -OWNER 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. + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. -------------------------------------------------------------------------------- engine topaz @@ -11092,37 +11104,6 @@ distribution. contributors may be used to endorse or promote products derived from this software without specific prior written permission. -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 -OWNER 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. --------------------------------------------------------------------------------- -garnet -topaz - -Copyright 2018 The Fuchsia Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * 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. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - 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 @@ -14597,28 +14578,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- observatory_pub_packages -Copyright (c) 2006 Kirill Simonov - -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: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -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. --------------------------------------------------------------------------------- -observatory_pub_packages - Copyright (c) 2006-2012 The Authors Contributors: @@ -14676,36 +14635,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- observatory_pub_packages -Copyright (c) 2012 The Polymer Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * 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. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -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 -OWNER 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. --------------------------------------------------------------------------------- -observatory_pub_packages - Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file for details. All rights reserved. @@ -14813,36 +14742,6 @@ met: -------------------------------------------------------------------------------- observatory_pub_packages -Copyright (c) 2014 The Polymer Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * 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. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -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 -OWNER 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. --------------------------------------------------------------------------------- -observatory_pub_packages - Copyright (c) 2014, Michael Bostock and Google Inc. All rights reserved. @@ -14967,7 +14866,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- observatory_pub_packages -Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file +Copyright (c) 2017, the Dart project authors. +Please see the AUTHORS file for details. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -14998,7 +14898,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- observatory_pub_packages -Copyright 2013, the Dart project authors. All rights reserved. +Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file +for details. All rights reserved. + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -15027,11 +14929,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- observatory_pub_packages -Copyright 2014 The Dart project authors. All rights reserved. - +Copyright 2013, the Dart project authors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above @@ -15041,6 +14943,7 @@ met: * Neither the name of Google Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + 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 @@ -15968,6 +15871,37 @@ Exhibit B - "Incompatible With Secondary Licenses" Notice This Source Code Form is "Incompatible With Secondary Licenses", as defined by the Mozilla Public License, v. 2.0. -------------------------------------------------------------------------------- +skcms +skia + +Copyright 2018 Google Inc. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * 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. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +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 +OWNER 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. +-------------------------------------------------------------------------------- skia Copyright (C) 2006 Apple Computer, Inc. All rights reserved. @@ -16972,7 +16906,37 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- skia -Copyright 2018 Google Inc. +Copyright 2018 Google LLC + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * 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. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +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 +OWNER 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. +-------------------------------------------------------------------------------- +skia + +Copyright 2018 Google, LLC Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are @@ -17855,34 +17819,3 @@ freely, subject to the following restrictions: Jean-loup Gailly Mark Adler -------------------------------------------------------------------------------- -dart - -Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file -for details. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * 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. - * Neither the name of Google Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. -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 -OWNER 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. -------------------------------------------------------------------------------- - diff --git a/flutter_map_example/lib/main.dart b/flutter_map_example/lib/main.dart index 20bfa7450..63fa34f1a 100644 --- a/flutter_map_example/lib/main.dart +++ b/flutter_map_example/lib/main.dart @@ -1,4 +1,11 @@ import 'package:flutter/material.dart'; +import 'package:flutter_map_example/pages/esri.dart'; +import 'package:flutter_map_example/pages/home.dart'; +import 'package:flutter_map_example/pages/map_controller.dart'; +import 'package:flutter_map_example/pages/marker_anchor.dart'; +import 'package:flutter_map_example/pages/polyline.dart'; +import 'package:flutter_map_example/pages/tap_to_add.dart'; +import 'package:flutter_map_example/widgets/drawer.dart'; import 'package:latlong/latlong.dart'; import 'package:flutter_map/flutter_map.dart'; @@ -25,531 +32,6 @@ class MyApp extends StatelessWidget { } } -class HomePage extends StatelessWidget { - static const String route = '/'; - Widget build(BuildContext context) { - var markers = [ - new Marker( - width: 80.0, - height: 80.0, - point: new LatLng(51.5, -0.09), - builder: (ctx) => new Container( - child: new FlutterLogo(), - ), - ), - new Marker( - width: 80.0, - height: 80.0, - point: new LatLng(53.3498, -6.2603), - builder: (ctx) => new Container( - child: new FlutterLogo( - colors: Colors.green, - ), - ), - ), - new Marker( - width: 80.0, - height: 80.0, - point: new LatLng(48.8566, 2.3522), - builder: (ctx) => new Container( - child: new FlutterLogo(colors: Colors.purple), - ), - ), - ]; - - return new Scaffold( - appBar: new AppBar(title: new Text("Home")), - drawer: _buildDrawer(context, route), - body: new Padding( - padding: new EdgeInsets.all(8.0), - child: new Column( - children: [ - new Padding( - padding: new EdgeInsets.only(top: 8.0, bottom: 8.0), - child: new Text("This is a map that is showing (51.5, -0.9)."), - ), - new Flexible( - child: new FlutterMap( - options: new MapOptions( - center: new LatLng(51.5, -0.09), - zoom: 5.0, - ), - layers: [ - new TileLayerOptions( - urlTemplate: - "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", - subdomains: ['a', 'b', 'c']), - new MarkerLayerOptions(markers: markers) - ], - ), - ), - ], - ), - ), - ); - } -} - -class TapToAddPage extends StatefulWidget { - static const String route = '/tap'; - - State createState() { - return new TapToAddPageState(); - } -} - -class TapToAddPageState extends State { - List tappedPoints = []; - - Widget build(BuildContext context) { - var markers = tappedPoints.map((latlng) { - return new Marker( - width: 80.0, - height: 80.0, - point: latlng, - builder: (ctx) => new Container( - child: new FlutterLogo(), - ), - ); - }).toList(); - - return new Scaffold( - appBar: new AppBar(title: new Text("Tap to add pins")), - drawer: _buildDrawer(context, TapToAddPage.route), - body: new Padding( - padding: new EdgeInsets.all(8.0), - child: new Column( - children: [ - new Padding( - padding: new EdgeInsets.only(top: 8.0, bottom: 8.0), - child: new Text("Tap to add pins"), - ), - new Flexible( - child: new FlutterMap( - options: new MapOptions( - center: new LatLng(45.5231, -122.6765), - zoom: 13.0, - onTap: _handleTap), - layers: [ - new TileLayerOptions( - urlTemplate: - "https://tile.openstreetmap.org/{z}/{x}/{y}.png", - ), - new MarkerLayerOptions(markers: markers) - ], - ), - ), - ], - ), - ), - ); - } - - void _handleTap(LatLng latlng) { - setState(() { - tappedPoints.add(latlng); - }); - } -} - -class EsriPage extends StatelessWidget { - static const String route = "esri"; - - Widget build(BuildContext context) { - return new Scaffold( - appBar: new AppBar(title: new Text("Esri")), - drawer: _buildDrawer(context, TapToAddPage.route), - body: new Padding( - padding: new EdgeInsets.all(8.0), - child: new Column( - children: [ - new Padding( - padding: new EdgeInsets.only(top: 8.0, bottom: 8.0), - child: new Text("Esri"), - ), - new Flexible( - child: new FlutterMap( - options: new MapOptions( - center: new LatLng(45.5231, -122.6765), - zoom: 13.0, - ), - layers: [ - new TileLayerOptions( - urlTemplate: - "https://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}", - ), - ], - ), - ), - ], - ), - ), - ); - } -} - -class PolylinePage extends StatelessWidget { - static const String route = "polyline"; - - Widget build(BuildContext context) { - var points = [ - new LatLng(51.5, -0.09), - new LatLng(53.3498, -6.2603), - new LatLng(48.8566, 2.3522), - ]; - return new Scaffold( - appBar: new AppBar(title: new Text("Polylines")), - drawer: _buildDrawer(context, TapToAddPage.route), - body: new Padding( - padding: new EdgeInsets.all(8.0), - child: new Column( - children: [ - new Padding( - padding: new EdgeInsets.only(top: 8.0, bottom: 8.0), - child: new Text("Polylines"), - ), - new Flexible( - child: new FlutterMap( - options: new MapOptions( - center: new LatLng(51.5, -0.09), - zoom: 5.0, - ), - layers: [ - new TileLayerOptions( - urlTemplate: - "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", - subdomains: ['a', 'b', 'c']), - new PolylineLayerOptions( - polylines: [ - new Polyline( - points: points, - strokeWidth: 4.0, - color: Colors.purple), - ], - ) - ], - ), - ), - ], - ), - ), - ); - } -} - -class AppDrawer extends StatelessWidget { - Widget build(BuildContext context) { - return new AppBar( - elevation: 0.0, - title: new Text("Examples"), - ); - } -} - -Drawer _buildDrawer(BuildContext context, String currentRoute) { - return new Drawer( - child: new ListView( - children: [ - const DrawerHeader( - child: const Center( - child: const Text("Flutter Map Examples"), - ), - ), - new ListTile( - title: const Text('OpenStreetMap'), - selected: currentRoute == HomePage.route, - onTap: () { - Navigator.popAndPushNamed(context, HomePage.route); - }, - ), - new ListTile( - title: const Text('Add Pins'), - selected: currentRoute == TapToAddPage.route, - onTap: () { - Navigator.popAndPushNamed(context, TapToAddPage.route); - }, - ), - new ListTile( - title: const Text('Esri'), - selected: currentRoute == EsriPage.route, - onTap: () { - Navigator.popAndPushNamed(context, EsriPage.route); - }, - ), - new ListTile( - title: const Text('Polylines'), - selected: currentRoute == EsriPage.route, - onTap: () { - Navigator.popAndPushNamed(context, PolylinePage.route); - }, - ), - new ListTile( - title: const Text('MapController'), - selected: currentRoute == MapControllerPage.route, - onTap: () { - Navigator.popAndPushNamed(context, MapControllerPage.route); - }, - ), - new ListTile( - title: const Text('Marker Anchors'), - selected: currentRoute == MarkerAnchorPage.route, - onTap: () { - Navigator.popAndPushNamed(context, MarkerAnchorPage.route); - }, - ), - ], - ), - ); -} - -class MapControllerPage extends StatefulWidget { - static const String route = 'map_controller'; - - @override - MapControllerPageState createState() { - return new MapControllerPageState(); - } -} - -class MapControllerPageState extends State { - static LatLng london = new LatLng(51.5, -0.09); - static LatLng paris = new LatLng(48.8566, 2.3522); - static LatLng dublin = new LatLng(53.3498, -6.2603); - - MapController mapController; - - void initState() { - super.initState(); - mapController = new MapController(); - } - - Widget build(BuildContext context) { - var markers = [ - new Marker( - width: 80.0, - height: 80.0, - point: london, - builder: (ctx) => new Container( - child: new FlutterLogo(), - ), - ), - new Marker( - width: 80.0, - height: 80.0, - point: dublin, - builder: (ctx) => new Container( - child: new FlutterLogo( - colors: Colors.green, - ), - ), - ), - new Marker( - width: 80.0, - height: 80.0, - point: paris, - builder: (ctx) => new Container( - child: new FlutterLogo(colors: Colors.purple), - ), - ), - ]; - - return new Scaffold( - appBar: new AppBar(title: new Text("MapController")), - drawer: _buildDrawer(context, MapControllerPage.route), - body: new Padding( - padding: new EdgeInsets.all(8.0), - child: new Column( - children: [ - new Padding( - padding: new EdgeInsets.only(top: 8.0, bottom: 8.0), - child: new Row( - children: [ - new MaterialButton( - child: new Text("London"), - onPressed: () { - mapController.move(london, 5.0); - }, - ), - new MaterialButton( - child: new Text("Paris"), - onPressed: () { - mapController.move(paris, 5.0); - }, - ), - new MaterialButton( - child: new Text("Dublin"), - onPressed: () { - mapController.move(dublin, 5.0); - }, - ), - ], - ), - ), - new Flexible( - child: new FlutterMap( - mapController: mapController, - options: new MapOptions( - center: new LatLng(51.5, -0.09), - zoom: 5.0, - ), - layers: [ - new TileLayerOptions( - urlTemplate: - "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", - subdomains: ['a', 'b', 'c']), - new MarkerLayerOptions(markers: markers) - ], - ), - ), - ], - ), - ), - ); - } -} - -class MarkerAnchorPage extends StatefulWidget { - static const String route = '/marker_anchors'; - @override - MarkerAnchorPageState createState() { - return new MarkerAnchorPageState(); - } -} - -class MarkerAnchorPageState extends State { - AnchorPos anchorPos; - Anchor anchorOverride; - - void initState() { - super.initState(); - anchorPos = AnchorPos.center; - anchorOverride = null; - } - - Widget build(BuildContext context) { - var markers = [ - new Marker( - width: 80.0, - height: 80.0, - point: new LatLng(51.5, -0.09), - builder: (ctx) => new Container( - child: new FlutterLogo(), - ), - anchor: anchorPos, - anchorOverride: anchorOverride), - new Marker( - width: 80.0, - height: 80.0, - point: new LatLng(53.3498, -6.2603), - builder: (ctx) => new Container( - child: new FlutterLogo( - colors: Colors.green, - ), - ), - anchor: anchorPos, - anchorOverride: anchorOverride), - new Marker( - width: 80.0, - height: 80.0, - point: new LatLng(48.8566, 2.3522), - builder: (ctx) => new Container( - child: new FlutterLogo(colors: Colors.purple), - ), - anchor: anchorPos, - anchorOverride: anchorOverride), - ]; - - return new Scaffold( - appBar: new AppBar(title: new Text("Marker Anchor Points")), - drawer: _buildDrawer(context, MarkerAnchorPage.route), - body: new Padding( - padding: new EdgeInsets.all(8.0), - child: new Column( - children: [ - new Padding( - padding: new EdgeInsets.only(top: 8.0, bottom: 8.0), - child: new Text( - "Markers can be anchored to the top, bottom, left or right."), - ), - new Padding( - padding: new EdgeInsets.only(top: 8.0, bottom: 8.0), - child: new Row( - children: [ - new MaterialButton( - child: new Text("Left"), - onPressed: () => setState(() { - anchorPos = AnchorPos.left; - anchorOverride = null; - }), - ), - new MaterialButton( - child: new Text("Right"), - onPressed: () => setState(() { - anchorPos = AnchorPos.right; - anchorOverride = null; - }), - ), - new MaterialButton( - child: new Text("Top"), - onPressed: () => setState(() { - anchorPos = AnchorPos.top; - anchorOverride = null; - }), - ), - new MaterialButton( - child: new Text("Bottom"), - onPressed: () => setState(() { - anchorPos = AnchorPos.bottom; - anchorOverride = null; - }), - ), - ], - ), - ), - new Padding( - padding: new EdgeInsets.only(top: 8.0, bottom: 8.0), - child: new Row( - children: [ - new MaterialButton( - child: new Text("Center"), - onPressed: () => setState(() { - anchorPos = AnchorPos.center; - anchorOverride = null; - }), - ), - new MaterialButton( - child: new Text("Custom"), - onPressed: () => setState( - () { - anchorOverride = new Anchor(80.0, 80.0); - }, - ), - ), - ], - ), - ), - new Flexible( - child: new FlutterMap( - options: new MapOptions( - center: new LatLng(51.5, -0.09), - zoom: 5.0, - ), - layers: [ - new TileLayerOptions( - urlTemplate: - "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", - subdomains: ['a', 'b', 'c']), - new MarkerLayerOptions(markers: markers) - ], - ), - ), - ], - ), - ), - ); - } -} - // Generated using Material Design Palette/Theme Generator // http://mcg.mbitson.com/ // https://github.com/mbitson/mcg diff --git a/flutter_map_example/lib/pages/esri.dart b/flutter_map_example/lib/pages/esri.dart new file mode 100644 index 000000000..ae2067bf8 --- /dev/null +++ b/flutter_map_example/lib/pages/esri.dart @@ -0,0 +1,41 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_map/flutter_map.dart'; +import 'package:flutter_map_example/pages/tap_to_add.dart'; +import 'package:flutter_map_example/widgets/drawer.dart'; +import 'package:latlong/latlong.dart'; + +class EsriPage extends StatelessWidget { + static const String route = "esri"; + + Widget build(BuildContext context) { + return new Scaffold( + appBar: new AppBar(title: new Text("Esri")), + drawer: buildDrawer(context, TapToAddPage.route), + body: new Padding( + padding: new EdgeInsets.all(8.0), + child: new Column( + children: [ + new Padding( + padding: new EdgeInsets.only(top: 8.0, bottom: 8.0), + child: new Text("Esri"), + ), + new Flexible( + child: new FlutterMap( + options: new MapOptions( + center: new LatLng(45.5231, -122.6765), + zoom: 13.0, + ), + layers: [ + new TileLayerOptions( + urlTemplate: + "https://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}", + ), + ], + ), + ), + ], + ), + ), + ); + } +} diff --git a/flutter_map_example/lib/pages/home.dart b/flutter_map_example/lib/pages/home.dart new file mode 100644 index 000000000..81781f76b --- /dev/null +++ b/flutter_map_example/lib/pages/home.dart @@ -0,0 +1,69 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_map/flutter_map.dart'; +import 'package:flutter_map_example/widgets/drawer.dart'; +import 'package:latlong/latlong.dart'; + +class HomePage extends StatelessWidget { + static const String route = '/'; + Widget build(BuildContext context) { + var markers = [ + new Marker( + width: 80.0, + height: 80.0, + point: new LatLng(51.5, -0.09), + builder: (ctx) => new Container( + child: new FlutterLogo(), + ), + ), + new Marker( + width: 80.0, + height: 80.0, + point: new LatLng(53.3498, -6.2603), + builder: (ctx) => new Container( + child: new FlutterLogo( + colors: Colors.green, + ), + ), + ), + new Marker( + width: 80.0, + height: 80.0, + point: new LatLng(48.8566, 2.3522), + builder: (ctx) => new Container( + child: new FlutterLogo(colors: Colors.purple), + ), + ), + ]; + + return new Scaffold( + appBar: new AppBar(title: new Text("Home")), + drawer: buildDrawer(context, route), + body: new Padding( + padding: new EdgeInsets.all(8.0), + child: new Column( + children: [ + new Padding( + padding: new EdgeInsets.only(top: 8.0, bottom: 8.0), + child: new Text("This is a map that is showing (51.5, -0.9)."), + ), + new Flexible( + child: new FlutterMap( + options: new MapOptions( + center: new LatLng(51.5, -0.09), + zoom: 5.0, + ), + layers: [ + new TileLayerOptions( + urlTemplate: + "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", + subdomains: ['a', 'b', 'c']), + new MarkerLayerOptions(markers: markers) + ], + ), + ), + ], + ), + ), + ); + } +} diff --git a/flutter_map_example/lib/pages/map_controller.dart b/flutter_map_example/lib/pages/map_controller.dart new file mode 100644 index 000000000..1cde15aa0 --- /dev/null +++ b/flutter_map_example/lib/pages/map_controller.dart @@ -0,0 +1,132 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_map/flutter_map.dart'; +import 'package:flutter_map_example/widgets/drawer.dart'; +import 'package:latlong/latlong.dart'; + +class MapControllerPage extends StatefulWidget { + static const String route = 'map_controller'; + + @override + MapControllerPageState createState() { + return new MapControllerPageState(); + } +} + +class MapControllerPageState extends State { + static LatLng london = new LatLng(51.5, -0.09); + static LatLng paris = new LatLng(48.8566, 2.3522); + static LatLng dublin = new LatLng(53.3498, -6.2603); + + MapController mapController; + + void initState() { + super.initState(); + mapController = new MapController(); + } + + Widget build(BuildContext context) { + var markers = [ + new Marker( + width: 80.0, + height: 80.0, + point: london, + builder: (ctx) => new Container( + child: new FlutterLogo(), + ), + ), + new Marker( + width: 80.0, + height: 80.0, + point: dublin, + builder: (ctx) => new Container( + child: new FlutterLogo( + colors: Colors.green, + ), + ), + ), + new Marker( + width: 80.0, + height: 80.0, + point: paris, + builder: (ctx) => new Container( + child: new FlutterLogo(colors: Colors.purple), + ), + ), + ]; + + return new Scaffold( + appBar: new AppBar(title: new Text("MapController")), + drawer: buildDrawer(context, MapControllerPage.route), + body: new Padding( + padding: new EdgeInsets.all(8.0), + child: new Column( + children: [ + new Padding( + padding: new EdgeInsets.only(top: 8.0, bottom: 8.0), + child: new Row( + children: [ + new MaterialButton( + child: new Text("London"), + onPressed: () { + mapController.move(london, 5.0); + }, + ), + new MaterialButton( + child: new Text("Paris"), + onPressed: () { + mapController.move(paris, 5.0); + }, + ), + new MaterialButton( + child: new Text("Dublin"), + onPressed: () { + mapController.move(dublin, 5.0); + }, + ), + ], + ), + ), + new Padding( + padding: new EdgeInsets.only(top: 8.0, bottom: 8.0), + child: new Row( + children: [ + new MaterialButton( + child: new Text("Fit Bounds"), + onPressed: () { + var bounds = new LatLngBounds(); + bounds.extend(dublin); + bounds.extend(paris); + bounds.extend(london); + mapController.fitBounds( + bounds, + new FitBoundsOptions( + padding: new Point(30.0, 0.0), + ), + ); + }, + ), + ], + ), + ), + new Flexible( + child: new FlutterMap( + mapController: mapController, + options: new MapOptions( + center: new LatLng(51.5, -0.09), + zoom: 5.0, + ), + layers: [ + new TileLayerOptions( + urlTemplate: + "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", + subdomains: ['a', 'b', 'c']), + new MarkerLayerOptions(markers: markers) + ], + ), + ), + ], + ), + ), + ); + } +} diff --git a/flutter_map_example/lib/pages/marker_anchor.dart b/flutter_map_example/lib/pages/marker_anchor.dart new file mode 100644 index 000000000..f687aca01 --- /dev/null +++ b/flutter_map_example/lib/pages/marker_anchor.dart @@ -0,0 +1,146 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_map/flutter_map.dart'; +import 'package:flutter_map_example/widgets/drawer.dart'; +import 'package:latlong/latlong.dart'; + +class MarkerAnchorPage extends StatefulWidget { + static const String route = '/marker_anchors'; + @override + MarkerAnchorPageState createState() { + return new MarkerAnchorPageState(); + } +} + +class MarkerAnchorPageState extends State { + AnchorPos anchorPos; + Anchor anchorOverride; + + void initState() { + super.initState(); + anchorPos = AnchorPos.center; + anchorOverride = null; + } + + Widget build(BuildContext context) { + var markers = [ + new Marker( + width: 80.0, + height: 80.0, + point: new LatLng(51.5, -0.09), + builder: (ctx) => new Container( + child: new FlutterLogo(), + ), + anchor: anchorPos, + anchorOverride: anchorOverride), + new Marker( + width: 80.0, + height: 80.0, + point: new LatLng(53.3498, -6.2603), + builder: (ctx) => new Container( + child: new FlutterLogo( + colors: Colors.green, + ), + ), + anchor: anchorPos, + anchorOverride: anchorOverride), + new Marker( + width: 80.0, + height: 80.0, + point: new LatLng(48.8566, 2.3522), + builder: (ctx) => new Container( + child: new FlutterLogo(colors: Colors.purple), + ), + anchor: anchorPos, + anchorOverride: anchorOverride), + ]; + + return new Scaffold( + appBar: new AppBar(title: new Text("Marker Anchor Points")), + drawer: buildDrawer(context, MarkerAnchorPage.route), + body: new Padding( + padding: new EdgeInsets.all(8.0), + child: new Column( + children: [ + new Padding( + padding: new EdgeInsets.only(top: 8.0, bottom: 8.0), + child: new Text( + "Markers can be anchored to the top, bottom, left or right."), + ), + new Padding( + padding: new EdgeInsets.only(top: 8.0, bottom: 8.0), + child: new Row( + children: [ + new MaterialButton( + child: new Text("Left"), + onPressed: () => setState(() { + anchorPos = AnchorPos.left; + anchorOverride = null; + }), + ), + new MaterialButton( + child: new Text("Right"), + onPressed: () => setState(() { + anchorPos = AnchorPos.right; + anchorOverride = null; + }), + ), + new MaterialButton( + child: new Text("Top"), + onPressed: () => setState(() { + anchorPos = AnchorPos.top; + anchorOverride = null; + }), + ), + new MaterialButton( + child: new Text("Bottom"), + onPressed: () => setState(() { + anchorPos = AnchorPos.bottom; + anchorOverride = null; + }), + ), + ], + ), + ), + new Padding( + padding: new EdgeInsets.only(top: 8.0, bottom: 8.0), + child: new Row( + children: [ + new MaterialButton( + child: new Text("Center"), + onPressed: () => setState(() { + anchorPos = AnchorPos.center; + anchorOverride = null; + }), + ), + new MaterialButton( + child: new Text("Custom"), + onPressed: () => setState( + () { + anchorOverride = new Anchor(80.0, 80.0); + }, + ), + ), + ], + ), + ), + new Flexible( + child: new FlutterMap( + options: new MapOptions( + center: new LatLng(51.5, -0.09), + zoom: 5.0, + ), + layers: [ + new TileLayerOptions( + urlTemplate: + "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", + subdomains: ['a', 'b', 'c']), + new MarkerLayerOptions(markers: markers) + ], + ), + ), + ], + ), + ), + ); + } +} \ No newline at end of file diff --git a/flutter_map_example/lib/pages/polyline.dart b/flutter_map_example/lib/pages/polyline.dart new file mode 100644 index 000000000..ce92ddb35 --- /dev/null +++ b/flutter_map_example/lib/pages/polyline.dart @@ -0,0 +1,53 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_map/flutter_map.dart'; +import 'package:flutter_map_example/widgets/drawer.dart'; +import 'package:latlong/latlong.dart'; + +class PolylinePage extends StatelessWidget { + static const String route = "polyline"; + + Widget build(BuildContext context) { + var points = [ + new LatLng(51.5, -0.09), + new LatLng(53.3498, -6.2603), + new LatLng(48.8566, 2.3522), + ]; + return new Scaffold( + appBar: new AppBar(title: new Text("Polylines")), + drawer: buildDrawer(context, PolylinePage.route), + body: new Padding( + padding: new EdgeInsets.all(8.0), + child: new Column( + children: [ + new Padding( + padding: new EdgeInsets.only(top: 8.0, bottom: 8.0), + child: new Text("Polylines"), + ), + new Flexible( + child: new FlutterMap( + options: new MapOptions( + center: new LatLng(51.5, -0.09), + zoom: 5.0, + ), + layers: [ + new TileLayerOptions( + urlTemplate: + "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", + subdomains: ['a', 'b', 'c']), + new PolylineLayerOptions( + polylines: [ + new Polyline( + points: points, + strokeWidth: 4.0, + color: Colors.purple), + ], + ) + ], + ), + ), + ], + ), + ), + ); + } +} \ No newline at end of file diff --git a/flutter_map_example/lib/pages/tap_to_add.dart b/flutter_map_example/lib/pages/tap_to_add.dart new file mode 100644 index 000000000..cd668c9d5 --- /dev/null +++ b/flutter_map_example/lib/pages/tap_to_add.dart @@ -0,0 +1,66 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_map/flutter_map.dart'; +import 'package:flutter_map_example/widgets/drawer.dart'; +import 'package:latlong/latlong.dart'; + +class TapToAddPage extends StatefulWidget { + static const String route = '/tap'; + + State createState() { + return new TapToAddPageState(); + } +} + +class TapToAddPageState extends State { + List tappedPoints = []; + + Widget build(BuildContext context) { + var markers = tappedPoints.map((latlng) { + return new Marker( + width: 80.0, + height: 80.0, + point: latlng, + builder: (ctx) => new Container( + child: new FlutterLogo(), + ), + ); + }).toList(); + + return new Scaffold( + appBar: new AppBar(title: new Text("Tap to add pins")), + drawer: buildDrawer(context, TapToAddPage.route), + body: new Padding( + padding: new EdgeInsets.all(8.0), + child: new Column( + children: [ + new Padding( + padding: new EdgeInsets.only(top: 8.0, bottom: 8.0), + child: new Text("Tap to add pins"), + ), + new Flexible( + child: new FlutterMap( + options: new MapOptions( + center: new LatLng(45.5231, -122.6765), + zoom: 13.0, + onTap: _handleTap), + layers: [ + new TileLayerOptions( + urlTemplate: + "https://tile.openstreetmap.org/{z}/{x}/{y}.png", + ), + new MarkerLayerOptions(markers: markers) + ], + ), + ), + ], + ), + ), + ); + } + + void _handleTap(LatLng latlng) { + setState(() { + tappedPoints.add(latlng); + }); + } +} diff --git a/flutter_map_example/lib/widgets/drawer.dart b/flutter_map_example/lib/widgets/drawer.dart new file mode 100644 index 000000000..c12294a6d --- /dev/null +++ b/flutter_map_example/lib/widgets/drawer.dart @@ -0,0 +1,64 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_map_example/main.dart'; +import 'package:flutter_map_example/pages/esri.dart'; +import 'package:flutter_map_example/pages/home.dart'; +import 'package:flutter_map_example/pages/map_controller.dart'; +import 'package:flutter_map_example/pages/marker_anchor.dart'; +import 'package:flutter_map_example/pages/polyline.dart'; +import 'package:flutter_map_example/pages/tap_to_add.dart'; + +Drawer buildDrawer(BuildContext context, String currentRoute) { + return new Drawer( + child: new ListView( + children: [ + const DrawerHeader( + child: const Center( + child: const Text("Flutter Map Examples"), + ), + ), + new ListTile( + title: const Text('OpenStreetMap'), + selected: currentRoute == HomePage.route, + onTap: () { + Navigator.popAndPushNamed(context, HomePage.route); + }, + ), + new ListTile( + title: const Text('Add Pins'), + selected: currentRoute == TapToAddPage.route, + onTap: () { + Navigator.popAndPushNamed(context, TapToAddPage.route); + }, + ), + new ListTile( + title: const Text('Esri'), + selected: currentRoute == EsriPage.route, + onTap: () { + Navigator.popAndPushNamed(context, EsriPage.route); + }, + ), + new ListTile( + title: const Text('Polylines'), + selected: currentRoute == EsriPage.route, + onTap: () { + Navigator.popAndPushNamed(context, PolylinePage.route); + }, + ), + new ListTile( + title: const Text('MapController'), + selected: currentRoute == MapControllerPage.route, + onTap: () { + Navigator.popAndPushNamed(context, MapControllerPage.route); + }, + ), + new ListTile( + title: const Text('Marker Anchors'), + selected: currentRoute == MarkerAnchorPage.route, + onTap: () { + Navigator.popAndPushNamed(context, MarkerAnchorPage.route); + }, + ), + ], + ), + ); +}