From d119f587aa91b1baeb9177214807b3e78e1cc1f8 Mon Sep 17 00:00:00 2001 From: Conan Tzou Date: Wed, 19 Aug 2015 19:53:45 -0700 Subject: [PATCH 1/6] update dev --- Gemfile.lock | 3 --- 1 file changed, 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 66b7758e..5b7293bd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -245,6 +245,3 @@ DEPENDENCIES sass stretchy unicorn - -BUNDLED WITH - 1.10.5 From c709772979745b170448c3887e3f869c7f0ff636 Mon Sep 17 00:00:00 2001 From: Conan Tzou Date: Wed, 19 Aug 2015 20:41:06 -0700 Subject: [PATCH 2/6] create map view and route --- app/app.rb | 4 ++++ app/views/map.html | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 app/views/map.html diff --git a/app/app.rb b/app/app.rb index 527a8dc1..1d6376b1 100644 --- a/app/app.rb +++ b/app/app.rb @@ -29,6 +29,10 @@ class App < Padrino::Application } end + get :map do + render :map, layout: true + end + get :endpoints do content_type :json endpoints = DataMagic.config.api_endpoints.keys.map { |key| diff --git a/app/views/map.html b/app/views/map.html new file mode 100644 index 00000000..949035d0 --- /dev/null +++ b/app/views/map.html @@ -0,0 +1,39 @@ + + + + + + + + + +
+ + + + From 4d6a8ff82804b62f0ae49e44b35c96532400caee Mon Sep 17 00:00:00 2001 From: Conan Tzou Date: Wed, 19 Aug 2015 21:04:32 -0700 Subject: [PATCH 3/6] get city markers to show up --- app/views/map.html | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/app/views/map.html b/app/views/map.html index 949035d0..4ba5cbaa 100644 --- a/app/views/map.html +++ b/app/views/map.html @@ -10,10 +10,10 @@
From f1da11a4e5a0a990ae4a7da254d579e30b869915 Mon Sep 17 00:00:00 2001 From: Conan Tzou Date: Wed, 19 Aug 2015 21:34:09 -0700 Subject: [PATCH 4/6] add infowindows --- app/views/{map.html => map.html.liquid} | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) rename app/views/{map.html => map.html.liquid} (68%) diff --git a/app/views/map.html b/app/views/map.html.liquid similarity index 68% rename from app/views/map.html rename to app/views/map.html.liquid index 4ba5cbaa..277d49dc 100644 --- a/app/views/map.html +++ b/app/views/map.html.liquid @@ -9,6 +9,7 @@
+ + <%== yield %> + + diff --git a/app/views/map.html b/app/views/map.html index 60216b18..c51be257 100644 --- a/app/views/map.html +++ b/app/views/map.html @@ -4,7 +4,6 @@ -
diff --git a/public/application.css b/public/application.css index 25fa51c5..520a51f5 100644 --- a/public/application.css +++ b/public/application.css @@ -1,2 +1,33 @@ body { } + +#map-background { + display: none; +} + +#map { + display: none; +} + +#map-background.active { + display: block; + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100vh; + background-color: black; + opacity: 0.8; +} + +#map.active { + display: block; + position: absolute; + width: 80%; + height: 80%; + top: 50%; + left: 50%; + transform: translate(-50%, -50%) !important; + -ms-transform: translate(-50%, -50%) !important; + -webkit-transform: translate(-50%, -50%) !important; +}