#13 show airport map on details page with aerodome info

This commit is contained in:
Nabeel Shahzad 2017-06-15 22:45:25 -05:00
parent cfe1913411
commit d61b4f1c3c
23 changed files with 1407 additions and 68 deletions

View File

@ -34,7 +34,8 @@ class AirportController extends InfyOmBaseController
$airports = $this->airportRepository->all();
return view('admin.airports.index')
->with('airports', $airports);
->with('airports', $airports)
->with('coords', ['lat' => '', 'lon' => '']);
}
/**
@ -78,11 +79,11 @@ class AirportController extends InfyOmBaseController
if (empty($airport)) {
Flash::error('Airport not found');
return redirect(route('admin.airports.index'));
}
return view('admin.airports.show')->with('airport', $airport);
return view('admin.airports.show')
->with('airport', $airport);
}
/**

View File

@ -18,7 +18,10 @@
"zizaco/entrust": "5.2.x-dev",
"prettus/l5-repository": "^2.6",
"spatie/laravel-pjax": "^1.3",
"symfony/yaml": "^3.3"
"symfony/yaml": "^3.3",
"cornford/googlmapper": "2.*",
"league/geotools": "@stable",
"toin0u/geotools-laravel": "^1.0"
},
"require-dev": {
"fzaninotto/faker": "~1.4",

846
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"content-hash": "2a812ab5f98781a23f47744c8a1f4fdd",
"content-hash": "54a87d4ef6ab895374f978fe8563b529",
"packages": [
{
"name": "barryvdh/laravel-ide-helper",
@ -121,6 +121,56 @@
],
"time": "2016-06-13T19:28:20+00:00"
},
{
"name": "cornford/googlmapper",
"version": "v2.25.0",
"source": {
"type": "git",
"url": "https://github.com/bradcornford/Googlmapper.git",
"reference": "4ad8ed16874143b475154a61f867af59bb1d4251"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/bradcornford/Googlmapper/zipball/4ad8ed16874143b475154a61f867af59bb1d4251",
"reference": "4ad8ed16874143b475154a61f867af59bb1d4251",
"shasum": ""
},
"require": {
"illuminate/support": "5.*",
"illuminate/view": "5.*",
"php": ">=5.4.0"
},
"require-dev": {
"mockery/mockery": "0.9.1",
"phpspec/phpspec": "2.0.*@dev"
},
"type": "library",
"autoload": {
"psr-0": {
"Cornford\\Googlmapper": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Bradley Cornford",
"email": "me@bradleycornford.co.uk"
}
],
"description": "An easy way to integrate Google Maps with Laravel.",
"keywords": [
"google",
"laravel",
"map",
"mapping",
"maps",
"streetview"
],
"time": "2017-04-20T08:30:20+00:00"
},
{
"name": "doctrine/annotations",
"version": "v1.4.0",
@ -652,6 +702,85 @@
"homepage": "https://github.com/dompdf/dompdf",
"time": "2016-05-11T00:36:29+00:00"
},
{
"name": "egeloen/http-adapter",
"version": "0.8.0",
"source": {
"type": "git",
"url": "https://github.com/egeloen/ivory-http-adapter.git",
"reference": "9641f11487ec26b24c6bbcee4f267cf62f60b855"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/egeloen/ivory-http-adapter/zipball/9641f11487ec26b24c6bbcee4f267cf62f60b855",
"reference": "9641f11487ec26b24c6bbcee4f267cf62f60b855",
"shasum": ""
},
"require": {
"php": ">=5.4.8",
"zendframework/zend-diactoros": "^1.1"
},
"require-dev": {
"cakephp/cakephp": "^3.0.3",
"ext-curl": "*",
"guzzle/guzzle": "^3.9.4@dev",
"guzzlehttp/guzzle": "^4.1.4|^5.0|^6.0",
"kriswallsmith/buzz": "^0.13",
"nategood/httpful": "^0.2.17",
"phpunit/phpunit": "^4.0",
"phpunit/phpunit-mock-objects": "dev-matcher-verify as 2.3.x-dev",
"psr/log": "^1.0",
"react/dns": "^0.4.1",
"react/http-client": "^0.4",
"satooshi/php-coveralls": "^0.6",
"symfony/event-dispatcher": "^2.0",
"zendframework/zend-http": "^2.3.4",
"zendframework/zendframework1": ">=1.12.9,<=1.12.14|^1.12.16"
},
"suggest": {
"ext-curl": "Allows you to use the cURL adapter",
"ext-http": "Allows you to use the PECL adapter",
"guzzle/guzzle": "Allows you to use the Guzzle 3 adapter",
"guzzlehttp/guzzle": "Allows you to use the Guzzle 4 adapter",
"kriswallsmith/buzz": "Allows you to use the Buzz adapter",
"nategood/httpful": "Allows you to use the httpful adapter",
"psr/log": "Allows you to use the logger event subscriber",
"symfony/event-dispatcher": "Allows you to use the event lifecycle",
"symfony/stopwatch": "Allows you to use the stopwatch http adapter and event subscriber",
"zendframework/zend-http": "Allows you to use the Zend 2 adapter",
"zendframework/zendframework1": "Allows you to use the Zend 1 adapter"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "0.8-dev"
}
},
"autoload": {
"psr-4": {
"Ivory\\HttpAdapter\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Eric GELOEN",
"email": "geloen.eric@gmail.com"
}
],
"description": "Issue HTTP request for PHP 5.3+.",
"keywords": [
"http",
"http-adapter",
"http-client",
"psr-7"
],
"abandoned": "php-http/httplug",
"time": "2015-08-12T09:35:40+00:00"
},
{
"name": "erusev/parsedown",
"version": "1.6.2",
@ -694,6 +823,51 @@
],
"time": "2017-03-29T16:04:15+00:00"
},
{
"name": "igorw/get-in",
"version": "v1.0.3",
"source": {
"type": "git",
"url": "https://github.com/igorw/get-in.git",
"reference": "170ded831f49abc6a6061f655aba9bdbcf7b8111"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/igorw/get-in/zipball/170ded831f49abc6a6061f655aba9bdbcf7b8111",
"reference": "170ded831f49abc6a6061f655aba9bdbcf7b8111",
"shasum": ""
},
"require": {
"php": ">=5.4"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
}
},
"autoload": {
"files": [
"src/get_in.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Igor Wiedler",
"email": "igor@wiedler.ch"
}
],
"description": "Functions for for hash map (assoc array) traversal.",
"keywords": [
"assoc-array",
"hash-map"
],
"time": "2014-12-15T23:03:51+00:00"
},
{
"name": "infyomlabs/adminlte-templates",
"version": "5.3.x-dev",
@ -737,7 +911,7 @@
"laravel",
"templates"
],
"time": "2017-05-20 10:43:37"
"time": "2017-05-20T10:43:37+00:00"
},
{
"name": "infyomlabs/laravel-generator",
@ -792,7 +966,7 @@
"test",
"view"
],
"time": "2016-08-18 14:19:50"
"time": "2016-08-18T14:19:50+00:00"
},
{
"name": "infyomlabs/swagger-generator",
@ -829,7 +1003,7 @@
"swagger",
"templates"
],
"time": "2016-02-14 10:41:03"
"time": "2016-02-14T10:41:03+00:00"
},
{
"name": "jeremeamia/SuperClosure",
@ -932,7 +1106,7 @@
"laravel",
"swagger"
],
"time": "2016-01-25 15:38:17"
"time": "2016-01-25T15:38:17+00:00"
},
{
"name": "laracasts/flash",
@ -979,16 +1153,16 @@
},
{
"name": "laravel/framework",
"version": "v5.4.25",
"version": "v5.4.26",
"source": {
"type": "git",
"url": "https://github.com/laravel/framework.git",
"reference": "6bcc9b1f542b3deed16d51f6aa1fe318ab407c2a"
"reference": "a7ebbfab64111e24f8e584db64e2be9279ded357"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/framework/zipball/6bcc9b1f542b3deed16d51f6aa1fe318ab407c2a",
"reference": "6bcc9b1f542b3deed16d51f6aa1fe318ab407c2a",
"url": "https://api.github.com/repos/laravel/framework/zipball/a7ebbfab64111e24f8e584db64e2be9279ded357",
"reference": "a7ebbfab64111e24f8e584db64e2be9279ded357",
"shasum": ""
},
"require": {
@ -1104,7 +1278,7 @@
"framework",
"laravel"
],
"time": "2017-06-07T13:35:12+00:00"
"time": "2017-06-13T18:58:49+00:00"
},
{
"name": "laravelcollective/html",
@ -1307,6 +1481,80 @@
],
"time": "2017-03-12T01:28:43+00:00"
},
{
"name": "league/geotools",
"version": "0.7.0",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/geotools.git",
"reference": "011c9649aed56e355de0fb7d51c9ccde0343da8e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/thephpleague/geotools/zipball/011c9649aed56e355de0fb7d51c9ccde0343da8e",
"reference": "011c9649aed56e355de0fb7d51c9ccde0343da8e",
"shasum": ""
},
"require": {
"php": ">=5.4",
"react/event-loop": "0.4.*",
"react/promise": "~2.2",
"symfony/console": "~2.7|~3.0",
"symfony/property-access": "~2.7|~3.0",
"symfony/serializer": "~2.7|~3.0",
"willdurand/geocoder": "~3.2"
},
"replace": {
"toin0u/geotools": "*"
},
"require-dev": {
"guzzle/guzzle": "~3.7",
"kriswallsmith/buzz": "~0.10",
"predis/predis": "~1.0",
"zendframework/zend-http": "~2.2"
},
"bin": [
"bin/geotools"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "0.7-dev"
}
},
"autoload": {
"psr-4": {
"League\\Geotools\\": "src",
"League\\Geotools\\Tests\\": "tests"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Antoine Corcy",
"email": "contact@sbin.dk",
"homepage": "http://sbin.dk",
"role": "Developer"
}
],
"description": "Geo-related tools PHP 5.4+ library (use 0.4 if you're using PHP 5.3)",
"homepage": "http://geotools-php.org/",
"keywords": [
"async",
"batch",
"bounds",
"distance",
"geocoder",
"geocoding",
"geoip",
"geometry",
"geotools"
],
"time": "2016-02-03T16:31:33+00:00"
},
{
"name": "maatwebsite/excel",
"version": "2.1.17",
@ -1874,6 +2122,56 @@
],
"time": "2015-06-08T23:53:46+00:00"
},
{
"name": "psr/http-message",
"version": "1.0.1",
"source": {
"type": "git",
"url": "https://github.com/php-fig/http-message.git",
"reference": "f6561bf28d520154e4b0ec72be95418abe6d9363"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363",
"reference": "f6561bf28d520154e4b0ec72be95418abe6d9363",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\Http\\Message\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
}
],
"description": "Common interface for HTTP messages",
"homepage": "https://github.com/php-fig/http-message",
"keywords": [
"http",
"http-message",
"psr",
"psr-7",
"request",
"response"
],
"time": "2016-08-06T14:39:51+00:00"
},
{
"name": "psr/log",
"version": "1.0.2",
@ -2003,6 +2301,94 @@
],
"time": "2017-03-26T20:37:53+00:00"
},
{
"name": "react/event-loop",
"version": "v0.4.3",
"source": {
"type": "git",
"url": "https://github.com/reactphp/event-loop.git",
"reference": "8bde03488ee897dc6bb3d91e4e17c353f9c5252f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/reactphp/event-loop/zipball/8bde03488ee897dc6bb3d91e4e17c353f9c5252f",
"reference": "8bde03488ee897dc6bb3d91e4e17c353f9c5252f",
"shasum": ""
},
"require": {
"php": ">=5.4.0"
},
"require-dev": {
"phpunit/phpunit": "~4.8"
},
"suggest": {
"ext-event": "~1.0",
"ext-libev": "*",
"ext-libevent": ">=0.1.0"
},
"type": "library",
"autoload": {
"psr-4": {
"React\\EventLoop\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "Event loop abstraction layer that libraries can use for evented I/O.",
"keywords": [
"asynchronous",
"event-loop"
],
"time": "2017-04-27T10:56:23+00:00"
},
{
"name": "react/promise",
"version": "v2.5.1",
"source": {
"type": "git",
"url": "https://github.com/reactphp/promise.git",
"reference": "62785ae604c8d69725d693eb370e1d67e94c4053"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/reactphp/promise/zipball/62785ae604c8d69725d693eb370e1d67e94c4053",
"reference": "62785ae604c8d69725d693eb370e1d67e94c4053",
"shasum": ""
},
"require": {
"php": ">=5.4.0"
},
"require-dev": {
"phpunit/phpunit": "~4.8"
},
"type": "library",
"autoload": {
"psr-4": {
"React\\Promise\\": "src/"
},
"files": [
"src/functions_include.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jan Sorgalla",
"email": "jsorgalla@gmail.com"
}
],
"description": "A lightweight implementation of CommonJS Promises/A for PHP",
"keywords": [
"promise",
"promises"
],
"time": "2017-03-25T12:08:31+00:00"
},
{
"name": "spatie/laravel-pjax",
"version": "1.3.1",
@ -2650,6 +3036,63 @@
"homepage": "https://symfony.com",
"time": "2017-06-06T03:59:58+00:00"
},
{
"name": "symfony/inflector",
"version": "v3.3.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/inflector.git",
"reference": "aed5a0874a3bcfd8d0393a2d91b4cf828f29c7fb"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/inflector/zipball/aed5a0874a3bcfd8d0393a2d91b4cf828f29c7fb",
"reference": "aed5a0874a3bcfd8d0393a2d91b4cf828f29c7fb",
"shasum": ""
},
"require": {
"php": ">=5.5.9"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.3-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\Inflector\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Bernhard Schussek",
"email": "bschussek@gmail.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony Inflector Component",
"homepage": "https://symfony.com",
"keywords": [
"inflection",
"pluralize",
"singularize",
"string",
"symfony",
"words"
],
"time": "2017-04-12T14:14:56+00:00"
},
{
"name": "symfony/polyfill-mbstring",
"version": "v1.4.0",
@ -2765,6 +3208,65 @@
],
"time": "2017-06-09T08:25:21+00:00"
},
{
"name": "symfony/polyfill-php70",
"version": "v1.4.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php70.git",
"reference": "032fd647d5c11a9ceab8ee8747e13b5448e93874"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/032fd647d5c11a9ceab8ee8747e13b5448e93874",
"reference": "032fd647d5c11a9ceab8ee8747e13b5448e93874",
"shasum": ""
},
"require": {
"paragonie/random_compat": "~1.0|~2.0",
"php": ">=5.3.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.4-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Php70\\": ""
},
"files": [
"bootstrap.php"
],
"classmap": [
"Resources/stubs"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"polyfill",
"portable",
"shim"
],
"time": "2017-06-09T14:24:12+00:00"
},
{
"name": "symfony/polyfill-util",
"version": "v1.4.0",
@ -2866,6 +3368,74 @@
"homepage": "https://symfony.com",
"time": "2017-05-22T12:32:03+00:00"
},
{
"name": "symfony/property-access",
"version": "v3.3.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/property-access.git",
"reference": "70bbfe28f77070d41957495bc6fed34f139fe6f7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/property-access/zipball/70bbfe28f77070d41957495bc6fed34f139fe6f7",
"reference": "70bbfe28f77070d41957495bc6fed34f139fe6f7",
"shasum": ""
},
"require": {
"php": ">=5.5.9",
"symfony/inflector": "~3.1",
"symfony/polyfill-php70": "~1.0"
},
"require-dev": {
"symfony/cache": "~3.1"
},
"suggest": {
"psr/cache-implementation": "To cache access methods."
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.3-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\PropertyAccess\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony PropertyAccess Component",
"homepage": "https://symfony.com",
"keywords": [
"access",
"array",
"extraction",
"index",
"injection",
"object",
"property",
"property path",
"reflection"
],
"time": "2017-06-02T09:51:43+00:00"
},
{
"name": "symfony/routing",
"version": "v3.3.2",
@ -2944,6 +3514,83 @@
],
"time": "2017-06-02T09:51:43+00:00"
},
{
"name": "symfony/serializer",
"version": "v3.3.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/serializer.git",
"reference": "cc9b41611f4853cd01216f8765faba3db91a1583"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/serializer/zipball/cc9b41611f4853cd01216f8765faba3db91a1583",
"reference": "cc9b41611f4853cd01216f8765faba3db91a1583",
"shasum": ""
},
"require": {
"php": ">=5.5.9"
},
"conflict": {
"symfony/dependency-injection": "<3.2",
"symfony/property-access": ">=3.0,<3.0.4|>=2.8,<2.8.4",
"symfony/property-info": "<3.1",
"symfony/yaml": "<3.3"
},
"require-dev": {
"doctrine/annotations": "~1.0",
"doctrine/cache": "~1.0",
"phpdocumentor/reflection-docblock": "~3.0",
"symfony/cache": "~3.1",
"symfony/config": "~2.8|~3.0",
"symfony/dependency-injection": "~3.2",
"symfony/http-foundation": "~2.8|~3.0",
"symfony/property-access": "~2.8|~3.0",
"symfony/property-info": "~3.1",
"symfony/yaml": "~3.3"
},
"suggest": {
"doctrine/annotations": "For using the annotation mapping. You will also need doctrine/cache.",
"doctrine/cache": "For using the default cached annotation reader and metadata cache.",
"psr/cache-implementation": "For using the metadata cache.",
"symfony/config": "For using the XML mapping loader.",
"symfony/http-foundation": "To use the DataUriNormalizer.",
"symfony/property-access": "For using the ObjectNormalizer.",
"symfony/property-info": "To deserialize relations.",
"symfony/yaml": "For using the default YAML mapping loader."
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.3-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\Serializer\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony Serializer Component",
"homepage": "https://symfony.com",
"time": "2017-05-22T09:36:51+00:00"
},
{
"name": "symfony/translation",
"version": "v3.3.2",
@ -3179,6 +3826,68 @@
"homepage": "https://github.com/tijsverkoyen/CssToInlineStyles",
"time": "2016-09-20T12:50:39+00:00"
},
{
"name": "toin0u/geotools-laravel",
"version": "1.0.0",
"source": {
"type": "git",
"url": "https://github.com/toin0u/Geotools-laravel.git",
"reference": "262e4209bd6368c9b69a59b55bea90dbbb5d221b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/toin0u/Geotools-laravel/zipball/262e4209bd6368c9b69a59b55bea90dbbb5d221b",
"reference": "262e4209bd6368c9b69a59b55bea90dbbb5d221b",
"shasum": ""
},
"require": {
"league/geotools": "~0.4",
"php": ">=5.4"
},
"require-dev": {
"orchestra/testbench": "~2.0",
"phpunit/phpunit": "~4.0",
"satooshi/php-coveralls": "~0.6"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "0.3-dev"
}
},
"autoload": {
"psr-4": {
"Toin0u\\Geotools\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Antoine Corcy",
"email": "contact@sbin.dk",
"homepage": "http://sbin.dk",
"role": "Developer"
}
],
"description": "Geo-related tools PHP 5.3 library for Laravel 5",
"homepage": "http://geotools-php.org/",
"keywords": [
"async",
"batch",
"bounds",
"distance",
"geocoder",
"geocoding",
"geoip",
"geometry",
"geotools",
"laravel"
],
"time": "2015-02-23T12:40:40+00:00"
},
{
"name": "vlucas/phpdotenv",
"version": "v2.4.0",
@ -3229,6 +3938,66 @@
],
"time": "2016-09-01T10:05:43+00:00"
},
{
"name": "willdurand/geocoder",
"version": "v3.3.0",
"source": {
"type": "git",
"url": "https://github.com/geocoder-php/Geocoder.git",
"reference": "ccc178e2984c0af24881faa0ffe515f20e5e8c23"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/geocoder-php/Geocoder/zipball/ccc178e2984c0af24881faa0ffe515f20e5e8c23",
"reference": "ccc178e2984c0af24881faa0ffe515f20e5e8c23",
"shasum": ""
},
"require": {
"egeloen/http-adapter": "~0.8",
"igorw/get-in": "~1.0",
"php": ">=5.4.0"
},
"require-dev": {
"geoip2/geoip2": "~2.0",
"symfony/stopwatch": "~2.5"
},
"suggest": {
"ext-geoip": "Enabling the geoip extension allows you to use the MaxMindProvider.",
"geoip/geoip": "If you are going to use the MaxMindBinaryProvider (conflict with geoip extension).",
"geoip2/geoip2": "If you are going to use the GeoIP2DatabaseProvider.",
"symfony/stopwatch": "If you want to use the TimedGeocoder"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.3-dev"
}
},
"autoload": {
"psr-0": {
"Geocoder": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "William Durand",
"email": "william.durand1@gmail.com"
}
],
"description": "The almost missing Geocoder PHP 5.4 library.",
"homepage": "http://geocoder-php.org",
"keywords": [
"abstraction",
"geocoder",
"geocoding",
"geoip"
],
"time": "2015-12-06T20:17:20+00:00"
},
{
"name": "yajra/laravel-datatables-oracle",
"version": "v6.24.1",
@ -3289,6 +4058,58 @@
],
"time": "2017-01-24T02:46:52+00:00"
},
{
"name": "zendframework/zend-diactoros",
"version": "1.4.0",
"source": {
"type": "git",
"url": "https://github.com/zendframework/zend-diactoros.git",
"reference": "b03f285a333f51e58c95cce54109a4a9ed691436"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/zendframework/zend-diactoros/zipball/b03f285a333f51e58c95cce54109a4a9ed691436",
"reference": "b03f285a333f51e58c95cce54109a4a9ed691436",
"shasum": ""
},
"require": {
"php": "^5.4 || ^7.0",
"psr/http-message": "~1.0"
},
"provide": {
"psr/http-message-implementation": "1.0"
},
"require-dev": {
"ext-dom": "*",
"ext-libxml": "*",
"phpunit/phpunit": "^4.6 || ^5.5",
"zendframework/zend-coding-standard": "~1.0.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.4-dev",
"dev-develop": "1.5-dev"
}
},
"autoload": {
"psr-4": {
"Zend\\Diactoros\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-2-Clause"
],
"description": "PSR HTTP Message implementations",
"homepage": "https://github.com/zendframework/zend-diactoros",
"keywords": [
"http",
"psr",
"psr-7"
],
"time": "2017-04-06T16:18:34+00:00"
},
{
"name": "zircote/swagger-php",
"version": "2.0.10",
@ -3417,7 +4238,7 @@
"permission",
"roles"
],
"time": "2016-12-29 06:25:06"
"time": "2016-12-29T06:25:06+00:00"
}
],
"packages-dev": [
@ -4895,7 +5716,8 @@
"infyomlabs/adminlte-templates": 20,
"infyomlabs/swagger-generator": 20,
"jlapp/swaggervel": 20,
"zizaco/entrust": 20
"zizaco/entrust": 20,
"league/geotools": 0
},
"prefer-stable": false,
"prefer-lowest": false,

View File

@ -101,10 +101,12 @@ return [
* Application Service Providers...
*/
App\Providers\AppServiceProvider::class,
// App\Providers\BroadcastServiceProvider::class,
App\Providers\BroadcastServiceProvider::class,
App\Providers\AuthServiceProvider::class,
App\Providers\EventServiceProvider::class,
App\Providers\RouteServiceProvider::class,
Toin0u\Geotools\GeotoolsServiceProvider::class,
],
'aliases' => [
@ -145,6 +147,7 @@ return [
'Html' => Collective\Html\HtmlFacade::class,
'Flash' => Laracasts\Flash\Flash::class,
'Yaml' => Symfony\Component\Yaml\Yaml::class,
'Geotools' => Toin0u\Geotools\Facade\Geotools::class,
],
];

View File

@ -50,6 +50,12 @@ aircraft_classes:
- id: 1
code: H
name: Heavy
- id: 2
code: M
name: Medium
- id: 3
code: L
name: Light
#
aircraft:

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

80
public/js/admin/admin.js Normal file
View File

@ -0,0 +1,80 @@
/**
* admin functions, mostly map/mapping related
*/
function phpvms_render_airspace_map(opts) {
opts = __parse_opts(opts);
var map = __draw_base_map(opts);
if(opts.set_marker == true) { L.marker(coords).addTo(map); }
return map;
}
function __parse_opts(opts) {
_.defaults(opts, {
render_elem: 'map',
overlay_elem: '',
lat: 0,
lon: 0,
zoom: 12,
layers: [],
set_marker: false,
});
return opts;
}
function __draw_base_map(opts) {
var coords = [opts.lat, opts.lon];
/*var openaip_airspace_labels = new L.TileLayer.WMS(
"http://{s}.tile.maps.openaip.net/geowebcache/service/wms", {
maxZoom: 14,
minZoom: 12,
layers: 'openaip_approved_airspaces_labels',
tileSize: 1024,
detectRetina: true,
subdomains: '12',
format: 'image/png',
transparent: true
});
openaip_airspace_labels.addTo(map);*/
var opencyclemap_phys_osm = new L.TileLayer(
'http://{s}.tile.thunderforest.com/landscape/{z}/{x}/{y}.png?apikey=f09a38fa87514de4890fc96e7fe8ecb1', {
maxZoom: 14,
minZoom: 4,
format: 'image/png',
transparent: true
});
var openaip_cached_basemap = new L.TileLayer("http://{s}.tile.maps.openaip.net/geowebcache/service/tms/1.0.0/openaip_basemap@EPSG%3A900913@png/{z}/{x}/{y}.png", {
maxZoom: 14,
minZoom: 4,
tms: true,
detectRetina: false,
subdomains: '12',
format: 'image/png',
transparent: true
});
var openaip_basemap_phys_osm = L.featureGroup([opencyclemap_phys_osm, openaip_cached_basemap]);
var map = L.map('map', {
layers: [openaip_basemap_phys_osm],
center: coords,
zoom: opts.zoom,
scrollWheelZoom: false,
}).setView(coords, opts.zoom);
var attrib = L.control.attribution({position: 'bottomleft'});
attrib.addAttribution("<a href=\"https://www.thunderforest.com\" target=\"_blank\" style=\"\">Thunderforest</a>");
attrib.addAttribution("<a href=\"https://www.openaip.net\" target=\"_blank\" style=\"\">openAIP</a>");
attrib.addAttribution("<a href=\"https://www.openstreetmap.org/copyright\" target=\"_blank\" style=\"\">OpenStreetMap</a> contributors");
attrib.addAttribution("<a href=\"https://www.openweathermap.org\" target=\"_blank\" style=\"\">OpenWeatherMap</a>");
attrib.addTo(map);
return map;
}

View File

@ -1,8 +1,14 @@
@extends('admin.app')
@section('content')
<section class="content-header"><h1>{!! $aircraft->name !!}</section>
<section class="content-header">
<h1 class="pull-left">{!! $aircraft->name !!}</h1></section>
<h1 class="pull-right">
<a class="btn btn-primary pull-right" style="margin-top: -10px;margin-bottom: 5px" href="{!! route('admin.aircraft.edit', $aircraft->id) !!}">Edit</a>
</h1>
</section>
<section class="content">
<div class="clearfix"></div>
<div class="row">
@include('admin.aircraft.show_fields')
</div>

View File

@ -1,19 +1,35 @@
@extends('admin.app')
@section('content')
<section class="content-header">
<h1>
{!! $airport->name !!}
</h1>
</section>
<div class="content">
<div class="box box-primary">
<div class="box-body">
<div class="row" style="padding-left: 20px">
@include('admin.airports.show_fields')
<a href="{!! route('admin.airports.index') !!}" class="btn btn-default">Back</a>
<section class="content-header">
<h1 class="pull-left">{!! $airport->name !!} - {!! $airport->location !!}</h1>
<h1 class="pull-right">
<a class="btn btn-primary pull-right" style="margin-top: -10px;margin-bottom: 5px" href="{!! route('admin.airports.edit', $airport->id) !!}">Edit</a>
</h1>
</section>
<section class="content">
<div class="clearfix"></div>
<div class="row">
@include('admin.airports.show_fields')
</div>
<div class="box box-primary">
<div class="box-body">
<div class="row">
<div class="col-xs-12">
<div class="box-body">
<div id="map" style="width: 100%; height: 800px"></div>
</div>
</div>
</div>
</div>
</div>
</section>
@endsection
@section('scripts')
<script type="text/javascript">
phpvms_render_airspace_map({
lat: {!! $airport->lat !!},
lon: {!! $airport->lon !!},
});
</script>
@endsection

View File

@ -1,38 +1,22 @@
<!-- Icao Field -->
<div class="form-group">
{!! Form::label('icao', 'ICAO:') !!}
<p>{!! $airport->icao !!}</p>
<div class="form-group col-sm-6">
<div class="box box-solid">
<div class="box-header with-border">
<h3 class="box-title">ICAO</h3>
</div>
<div class="box-body">
<p class="lead">{!! $airport->icao !!}<strong></p>
</div>
</div>
</div>
<div class="form-group">
{!! Form::label('name', 'Name:') !!}
<p>{!! $airport->name !!}</p>
<div class="form-group col-sm-6">
<div class="box box-solid">
<div class="box-header with-border">
<h3 class="box-title">Coordinates</h3>
</div>
<div class="box-body">
<p class="lead">{!! $airport->lat!!}/{!! $airport->lon !!}</p>
</div>
</div>
</div>
<div class="form-group">
{!! Form::label('location', 'Location:') !!}
<p>{!! $airport->location !!}</p>
</div>
<div class="form-group">
{!! Form::label('lat', 'Latitude:') !!}
<p>{!! $airport->lat !!}</p>
</div>
<div class="form-group">
{!! Form::label('lon', 'Longitude:') !!}
<p>{!! $airport->lon !!}</p>
</div>
<!-- Created At Field -->
<div class="form-group">
{!! Form::label('created_at', 'Created At:') !!}
<p>{!! $airport->created_at !!}</p>
</div>
<!-- Updated At Field -->
<div class="form-group">
{!! Form::label('updated_at', 'Updated At:') !!}
<p>{!! $airport->updated_at !!}</p>
</div>

View File

@ -11,6 +11,11 @@
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.2/css/select2.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/admin-lte/2.3.3/css/AdminLTE.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/admin-lte/2.3.3/css/skins/_all-skins.min.css">
{{-- <link rel="stylesheet" href="/vendor/openlayers/ol.css" type="text/css"> --}}
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css"
integrity="sha512-07I2e+7D8p6he1SIM+1twR5TIrhUQn9+I6yjqD53JQjFiMf8EtC93ty0/5vJTZGF8aAocvHYNEDJajGdNx1IsQ=="
crossorigin=""/>
<!-- Ionicons -->
{{--<link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">--}}
@ -21,7 +26,7 @@
@yield('css')
</head>
<body class="skin-blue-light sidebar">
<body class="skin-blue sidebar-mini">
@if (!Auth::guest())
<div class="wrapper">
<!-- Main Header -->
@ -177,7 +182,7 @@
</div>
@endif
<!-- jQuery 2.1.4 -->
<script src="https://cdn.jsdelivr.net/lodash/4.17.4/lodash.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.2/js/select2.min.js"></script>
@ -189,6 +194,12 @@
<!-- AdminLTE App -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/admin-lte/2.3.3/js/app.min.js"></script>
<script src="https://unpkg.com/leaflet@1.0.3/dist/leaflet.js"
integrity="sha512-A7vV8IFfih/D732iSSKi20u/ooOfj/AGehOKq0f4vLT1Zr2Y+RX7C+w8A1gaSasGtRUZpF/NZgzSAu4/Gc41Lg=="
crossorigin=""></script>
{{-- <script src="/vendor/openlayers/ol.js"></script> --}}
<script src="/js/admin/admin.js"></script>
@yield('scripts')
</body>
</html>

View File

@ -25,12 +25,12 @@
@include('admin.menu')
</ul>
<!-- /.sidebar-menu -->
<div class="panel-footer" style="position:absolute;bottom: 0; width:100%; text-align: center;">
{{-- <div class="panel-footer" style="position:absolute;bottom: 0; width:100%; text-align: center;">
<p class="small" style="padding-top: 5px;">
copyright &copy; 2017
<a href="http://www.phpvms.net" target="_blank">phpvms</a>
</p>
</div>
</div> --}}
</section>
<!-- /.sidebar -->
</aside>

View File

@ -0,0 +1,22 @@
var circleCoordinates_{!! $id !!} = (
@foreach ($options['coordinates'] as $key => $coordinate)
new google.maps.LatLng({!! $coordinate['latitude'] !!}, {!! $coordinate['longitude'] !!})
@endforeach
);
var circle_{!! $id !!} = new google.maps.Circle({
strokeColor: '{!! $options['strokeColor'] !!}',
strokeOpacity: {!! $options['strokeOpacity'] !!},
strokeWeight: {!! $options['strokeWeight'] !!},
fillColor: '{!! $options['fillColor'] !!}',
fillOpacity: {!! $options['fillOpacity'] !!},
center: circleCoordinates_{!! $id !!},
radius: {!! $options['radius'] !!},
editable: {!! $options['editable'] ? 'true' : 'false' !!}
});
circle_{!! $id !!}.setMap({!! $options['map'] !!});
shapes.push({
'circle_{!! $id !!}': circle_{!! $id !!}
});

View File

@ -0,0 +1,37 @@
@if (!$view->shared('javascript', false))
@if ($view->share('javascript', true)) @endif
@if ($options['async'])
<script async defer type="text/javascript" src="//maps.googleapis.com/maps/api/js?v={!! $options['version'] !!}&region={!! $options['region'] !!}&language={!! $options['language'] !!}&key={!! $options['key'] !!}&signed_in={!! $options['user'] ? 'true' : 'false' !!}&libraries=places&callback=initialize_method"></script>
@else
<script type="text/javascript" src="//maps.googleapis.com/maps/api/js?v={!! $options['version'] !!}&region={!! $options['region'] !!}&language={!! $options['language'] !!}&key={!! $options['key'] !!}&signed_in={!! $options['user'] ? 'true' : 'false' !!}&libraries=places"></script>
@endif
@if ($options['cluster'])
<script type="text/javascript" src="//googlemaps.github.io/js-marker-clusterer/src/markerclusterer.js"></script>
@endif
@if ($options['async'])
<script type="text/javascript">
var initialize_items = [];
function initialize_method() {
initialize_items.forEach(function(item) {
item.method();
});
}
</script>
@endif
@endif

View File

@ -0,0 +1,106 @@
<div id="map-canvas-{!! $id !!}" style="width: 100%; height: 100%; margin: 0; padding: 0; position: relative; overflow: hidden;"></div>
<script type="text/javascript">
var maps = [];
function initialize_{!! $id !!}() {
var bounds = new google.maps.LatLngBounds();
var infowindow = new google.maps.InfoWindow();
var position = new google.maps.LatLng({!! $options['latitude'] !!}, {!! $options['longitude'] !!});
var mapOptions_{!! $id !!} = {
@if ($options['center'])
center: position,
@endif
mapTypeId: google.maps.MapTypeId.{!! $options['type'] !!},
disableDefaultUI: @if (!$options['ui']) true @else false @endif,
scrollwheel: @if ($options['scrollWheelZoom']) true @else false @endif,
fullscreenControl: @if ($options['fullscreenControl']) true @else false @endif,
};
var map_{!! $id !!} = new google.maps.Map(document.getElementById('map-canvas-{!! $id !!}'), mapOptions_{!! $id !!});
map_{!! $id !!}.setTilt({!! $options['tilt'] !!});
var markers = [];
var infowindows = [];
var shapes = [];
@foreach ($options['markers'] as $key => $marker)
{!! $marker->render($key, $view) !!}
@endforeach
@foreach ($options['shapes'] as $key => $shape)
{!! $shape->render($key, $view) !!}
@endforeach
@if ($options['overlay'] == 'BIKE')
var bikeLayer = new google.maps.BicyclingLayer();
bikeLayer.setMap(map_{!! $id !!});
@endif
@if ($options['overlay'] == 'TRANSIT')
var transitLayer = new google.maps.TransitLayer();
transitLayer.setMap(map_{!! $id !!});
@endif
@if ($options['overlay'] == 'TRAFFIC')
var trafficLayer = new google.maps.TrafficLayer();
trafficLayer.setMap(map_{!! $id !!});
@endif
var idleListener = google.maps.event.addListenerOnce(map_{!! $id !!}, "idle", function () {
map_{!! $id !!}.setZoom({!! $options['zoom'] !!});
@if (!$options['center'])
map_{!! $id !!}.fitBounds(bounds);
@endif
@if ($options['locate'])
if (typeof navigator !== 'undefined' && navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function (position) {
map_{!! $id !!}.setCenter(new google.maps.LatLng(position.coords.latitude, position.coords.longitude));
});
}
@endif
});
var map = map_{!! $id !!};
@if (isset($options['eventBeforeLoad']))
{!! $options['eventBeforeLoad'] !!}
@endif
@if (isset($options['eventAfterLoad']))
google.maps.event.addListenerOnce(map_{!! $id !!}, "tilesloaded", function() {
{!! $options['eventAfterLoad'] !!}
});
@endif
@if ($options['cluster'])
var markerClusterOptions = {
imagePath: '{!! $options['clusters']['icon'] !!}',
gridSize: {!! $options['clusters']['grid'] !!},
maxZoom: @if ($options['clusters']['zoom'] === null) null @else {!! $options['clusters']['zoom'] !!} @endif,
averageCenter: @if ($options['clusters']['center'] === true) true @else false @endif,
minimumClusterSize: {!! $options['clusters']['size'] !!}
};
var markerCluster = new MarkerClusterer(map_{!! $id !!}, markers, markerClusterOptions);
@endif
maps.push({
key: {!! $id !!},
markers: markers,
infowindows: infowindows,
map: map_{!! $id !!},
shapes: shapes
});
}
@if (!$options['async'])
google.maps.event.addDomListener(window, 'load', initialize_{!! $id !!});
@endif
</script>

View File

@ -0,0 +1,19 @@
@include('googlmapper::javascript')
@foreach ($items as $id => $item)
{!! $item->render($id, $view) !!}
@if ($options['async'])
<script type="text/javascript">
initialize_items.push({
method: initialize_{!! $id !!}
});
</script>
@endif
@endforeach

View File

@ -0,0 +1,110 @@
@if ($options['user'] && $options['place'])
var service = new google.maps.places.PlacesService({!! $options['map'] !!});
var request = {
placeId: '{!! $options['place'] !!}'
};
service.getDetails(request, function(placeResult, status) {
if (status != google.maps.places.PlacesServiceStatus.OK) {
alert('Unable to find the Place details.');
return;
}
@endif
var markerPosition_{!! $id !!} = new google.maps.LatLng({!! $options['latitude'] !!}, {!! $options['longitude'] !!});
var marker_{!! $id !!} = new google.maps.Marker({
position: markerPosition_{!! $id !!},
@if ($options['user'] && $options['place'])
place: {
placeId: '{!! $options['place'] !!}',
location: { lat: {!! $options['latitude'] !!}, lng: {!! $options['longitude'] !!} }
},
attribution: {
source: document.title,
webUrl: document.URL
},
@endif
@if (isset($options['draggable']) && $options['draggable'] == true)
draggable:true,
@endif
title: {!! json_encode((string) $options['title']) !!},
label: {!! json_encode((string) $options['label']) !!},
animation: @if (empty($options['animation']) || $options['animation'] == 'NONE') '' @else google.maps.Animation.{!! $options['animation'] !!} @endif,
@if ($options['symbol'])
icon: {
path: google.maps.SymbolPath.{!! $options['symbol'] !!},
scale: {!! $options['scale'] !!}
}
@else
icon: {!! json_encode((is_array($options['icon']) ? (array) $options['icon'] : (string) $options['icon'])) !!}
@endif
});
bounds.extend(marker_{!! $id !!}.position);
marker_{!! $id !!}.setMap({!! $options['map'] !!});
markers.push(marker_{!! $id !!});
@if ($options['user'] && $options['place'])
marker_{!! $id !!}.addListener('click', function() {
infowindow.setContent('<a href="' + placeResult.website + '">' + placeResult.name + '</a>');
infowindow.open({!! $options['map'] !!}, this);
});
});
@else
@if (!empty($options['content']))
var infowindow_{!! $id !!} = new google.maps.InfoWindow({
content: {!! json_encode((string) $options['content']) !!}
});
@if (isset($options['maxWidth']))
infowindow_{!! $id !!}.setOptions({ maxWidth: {!! $options['maxWidth'] !!} });
@endif
@if (isset($options['open']) && $options['open'])
infowindow_{!! $id !!}.open({!! $options['map'] !!}, marker_{!! $id !!});
@endif
google.maps.event.addListener(marker_{!! $id !!}, 'click', function() {
@if (isset($options['autoClose']) && $options['autoClose'])
for (var i = 0; i < infowindows.length; i++) {
infowindows[i].close();
}
@endif
infowindow_{!! $id !!}.open({!! $options['map'] !!}, marker_{!! $id !!});
});
infowindows.push(infowindow_{!! $id !!});
@endif
@endif
@foreach (['eventClick', 'eventRightClick', 'eventMouseOver', 'eventMouseDown', 'eventMouseUp', 'eventMouseOut', 'eventDrag', 'eventDragStart', 'eventDragEnd', 'eventDomReady'] as $event)
@if (isset($options[$event]))
google.maps.event.addListener(marker_{!! $id !!}, '{!! str_replace('event', '', strtolower($event)) !!}', function (event) {
{!! $options[$event] !!}
});
@endif
@endforeach

View File

@ -0,0 +1,12 @@
var overlayCoordinates_{!! $id !!} = new google.maps.LatLngBounds(
@foreach ($options['coordinates'] as $coordinate)
new google.maps.LatLng({!! $coordinate['latitude'] !!}, {!! $coordinate['longitude'] !!}),
@endforeach
);
overlay_{!! $id !!} = new google.maps.GroundOverlay(
'{!! $options['image'] !!}',
overlayCoordinates_{!! $id !!}
);
overlay_{!! $id !!}.setMap({!! $options['map'] !!});

View File

@ -0,0 +1,21 @@
var polygonCoordinates_{!! $id !!} = [
@foreach ($options['coordinates'] as $coordinate)
new google.maps.LatLng({!! $coordinate['latitude'] !!}, {!! $coordinate['longitude'] !!}),
@endforeach
];
var polygon_{!! $id !!} = new google.maps.Polygon({
paths: polygonCoordinates_{!! $id !!},
strokeColor: '{!! $options['strokeColor'] !!}',
strokeOpacity: {!! $options['strokeOpacity'] !!},
strokeWeight: {!! $options['strokeWeight'] !!},
fillColor: '{!! $options['fillColor'] !!}',
fillOpacity: {!! $options['fillOpacity'] !!},
editable: {!! $options['editable'] ? 'true' : 'false' !!}
});
polygon_{!! $id !!}.setMap({!! $options['map'] !!});
shapes.push({
'polygon_{!! $id !!}': polygon_{!! $id !!}
});

View File

@ -0,0 +1,20 @@
var polylineCoordinates_{!! $id !!} = [
@foreach ($options['coordinates'] as $coordinate)
new google.maps.LatLng({!! $coordinate['latitude'] !!}, {!! $coordinate['longitude'] !!}),
@endforeach
];
var polyline_{!! $id !!} = new google.maps.Polyline({
path: polylineCoordinates_{!! $id !!},
geodesic: {!! $options['strokeColor'] ? 'true' : 'false' !!},
strokeColor: '{!! $options['strokeColor'] !!}',
strokeOpacity: {!! $options['strokeOpacity'] !!},
strokeWeight: {!! $options['strokeWeight'] !!},
editable: {!! $options['editable'] ? 'true' : 'false' !!}
});
polyline_{!! $id !!}.setMap({!! $options['map'] !!});
shapes.push({
'polyline_{!! $id !!}': polyline_{!! $id !!}
});

View File

@ -0,0 +1,21 @@
var rectangleCoordinates_{!! $id !!} = new google.maps.LatLngBounds(
@foreach ($options['coordinates'] as $key => $coordinate)
new google.maps.LatLng({!! $coordinate['latitude'] !!}, {!! $coordinate['longitude'] !!})@if (count($options['coordinates']) - 1 > $key), @endif
@endforeach
);
var rectangle_{!! $id !!} = new google.maps.Rectangle({
strokeColor: '{!! $options['strokeColor'] !!}',
strokeOpacity: {!! $options['strokeOpacity'] !!},
strokeWeight: {!! $options['strokeWeight'] !!},
fillColor: '{!! $options['fillColor'] !!}',
fillOpacity: {!! $options['fillOpacity'] !!},
bounds: rectangleCoordinates_{!! $id !!},
editable: {!! $options['editable'] ? 'true' : 'false' !!}
});
rectangle_{!! $id !!}.setMap({!! $options['map'] !!});
shapes.push({
'rectangle_{!! $id !!}': rectangle_{!! $id !!}
});

View File

@ -0,0 +1,39 @@
<div id="map-canvas-{!! $id !!}" style="height: 100%; margin: 0; padding: 0;"></div>
<script type="text/javascript">
function initialize_{!! $id !!}() {
var bounds = new google.maps.LatLngBounds();
var position = new google.maps.LatLng({!! $options['latitude'] !!}, {!! $options['longitude'] !!});
var mapOptions = {
@if ($options['center'])
center: position,
@endif
zoom: {!! $options['zoom'] !!},
mapTypeId: google.maps.MapTypeId.{!! $options['type'] !!},
disableDefaultUI: @if (!$options['ui']) true @else false @endif
};
var map = new google.maps.Map(document.getElementById('map-canvas-{!! $id !!}'), mapOptions);
var panoramaOptions = {
position: position,
pov: {
heading: {!! $options['heading'] !!},
pitch: {!! $options['pitch'] !!}
}
};
var panorama = new google.maps.StreetViewPanorama(document.getElementById('map-canvas-{!! $id !!}'), panoramaOptions);
map.setStreetView(panorama);
}
@if (!$options['async'])
google.maps.event.addDomListener(window, 'load', initialize_{!! $id !!});
@endif
</script>