gb_mapfish_appserver 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +11 -0
- data/Gemfile +18 -0
- data/app/assets/images/gb_mapfish_appserver/.gitkeep +0 -0
- data/app/assets/javascripts/gb_mapfish_appserver/.gitkeep +0 -0
- data/app/assets/stylesheets/gb_mapfish_appserver/.gitkeep +0 -0
- data/app/controllers/print_controller.rb +5 -4
- data/app/models/layer.rb +6 -4
- data/app/models/topic.rb +14 -0
- data/app/views/topics/query.html.erb +1 -1
- data/gb_mapfish_appserver.gemspec +37 -0
- data/lib/gb_mapfish_appserver/version.rb +1 -1
- data/lib/generators/mapfish/install/install_generator.rb +4 -0
- data/lib/tasks/mapfile.rake +13 -9
- data/lib/tasks/templates/_infotable_auto.html.erb +0 -11
- data/script/rails +8 -0
- data/test/dummy/app/mailers/.gitkeep +0 -0
- data/test/dummy/app/models/.gitkeep +0 -0
- data/test/dummy/app/views/layers/custom/cascadingwms/_cascaded_info.html.erb +1 -1
- data/test/dummy/app/views/layers/custom/cascadingwms/auto/_cascaded_info.html.erb +6 -17
- data/test/dummy/app/views/layers/custom/cascadingwms/auto/_cascaded_legend.html.erb +2 -0
- data/test/dummy/app/views/layers/custom/cascadingwms/auto/_countries_info.html.erb +0 -11
- data/test/dummy/app/views/layers/custom/naturalearth/auto/_countries_info.html.erb +0 -11
- data/test/dummy/app/views/topics/_query_header.html.erb +3 -0
- data/test/dummy/app/views/topics/custom/auto/_cascadingwms_legend.html.erb +4 -0
- data/test/dummy/lib/assets/.gitkeep +0 -0
- data/test/dummy/lib/tasks/.gitkeep +0 -0
- data/test/dummy/lib/tasks/templates/_infotable_auto.html.erb +0 -11
- data/test/dummy/log/.gitkeep +0 -0
- data/test/dummy/mapconfig/maps.example.com/cascadingwms.map +4 -4
- data/test/dummy/public/apps/.sencha/workspace/plugin.xml +3 -0
- data/test/dummy/public/apps/.sencha/workspace/sencha.cfg +8 -0
- data/test/dummy/test/fixtures/.gitkeep +0 -0
- data/test/dummy/test/functional/.gitkeep +0 -0
- data/test/dummy/test/integration/.gitkeep +0 -0
- data/test/dummy/test/unit/.gitkeep +0 -0
- metadata +340 -336
- data/app/controllers/print_controller.rb~ +0 -243
- data/app/models/layer.rb~ +0 -283
- data/lib/tasks/mapfile.rake~ +0 -279
- data/test/dummy/config/database.yml +0 -52
- data/test/dummy/config/geodatabase.yml +0 -18
- data/test/dummy/log/development.log +0 -6378
- data/test/dummy/mapconfig/maps.example.com/connection.inc +0 -3
- data/test/dummy/tmp/cache/056/E21/permitted_resource_ids-index-Topic-roles-1 +0 -1
- data/test/dummy/tmp/cache/072/9A1/permitted_resource_ids-query-Layer-roles-1 +0 -0
- data/test/dummy/tmp/cache/0AB/111/permitted_resource_ids-legend-Layer-roles-1 +0 -0
- data/test/dummy/tmp/cache/FE2/C90/permitted_resource_ids-edit-Layer-roles-1 +0 -0
- data/test/dummy/tmp/cache/FE4/170/permitted_resource_ids-edit-Topic-roles-1 +0 -0
- data/test/dummy/tmp/cache/FF2/740/permitted_resource_ids-edit-Group-roles-1 +0 -0
- data/test/dummy/tmp/cache/FFD/960/permitted_resource_ids-show-Layer-roles-1 +0 -1
- data/test/dummy/tmp/cache/FFF/E40/permitted_resource_ids-show-Topic-roles-1 +0 -1
- data/test/dummy/tmp/pids/server.pid +0 -1
data/.gitignore
ADDED
data/Gemfile
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
source "http://rubygems.org"
|
2
|
+
|
3
|
+
# Declare your gem's dependencies in gb_mapfish_appserver.gemspec.
|
4
|
+
# Bundler will treat runtime dependencies like base dependencies, and
|
5
|
+
# development dependencies will be added by default to the :development group.
|
6
|
+
gemspec
|
7
|
+
|
8
|
+
# Declare any dependencies that are still in development here instead of in
|
9
|
+
# your gemspec. These might include edge Rails or gems from your path or
|
10
|
+
# Git. Remember to move these dependencies to your gemspec before releasing
|
11
|
+
# your gem to rubygems.org.
|
12
|
+
|
13
|
+
# To use debugger
|
14
|
+
# gem 'ruby-debug'
|
15
|
+
|
16
|
+
gem 'therubyracer', :platforms => :ruby
|
17
|
+
gem 'gb_mapfish_print'
|
18
|
+
gem 'ruby_mapscript', :platforms => :ruby
|
File without changes
|
File without changes
|
File without changes
|
@@ -134,11 +134,11 @@ class PrintController < ApplicationController
|
|
134
134
|
# use temp config file with added custom scales
|
135
135
|
print_config = File.read(@configFile)
|
136
136
|
print_config.gsub!(/scales:/, "scales:\n#{ scales.collect {|s| " - #{s.to_s}"}.join("\n") }")
|
137
|
-
config_file = TMP_PREFIX + tempId.to_s + "print.
|
137
|
+
config_file = TMP_PREFIX + tempId.to_s + "print.yml"
|
138
138
|
File.open(config_file, "w") { |file| file << print_config }
|
139
139
|
|
140
140
|
temp = TMP_PREFIX + tempId.to_s + TMP_SUFFIX
|
141
|
-
cmd = baseCmd + " --output=" + temp
|
141
|
+
cmd = baseCmd(config_file) + " --output=" + temp
|
142
142
|
result = ""
|
143
143
|
errors = ""
|
144
144
|
status = POpen4::popen4(cmd) do |stdout, stderr, stdin, pid|
|
@@ -213,8 +213,9 @@ class PrintController < ApplicationController
|
|
213
213
|
out
|
214
214
|
end
|
215
215
|
|
216
|
-
def baseCmd
|
217
|
-
|
216
|
+
def baseCmd(config_file = nil)
|
217
|
+
config = config_file || @configFile
|
218
|
+
"java -cp #{GbMapfishPrint::PRINT_JAR} org.mapfish.print.ShellMapPrinter --config=#{config}"
|
218
219
|
end
|
219
220
|
|
220
221
|
def cleanupTempFiles
|
data/app/models/layer.rb
CHANGED
@@ -171,16 +171,18 @@ EOS
|
|
171
171
|
def get_feature_info(searchgeo)
|
172
172
|
logger.debug searchgeo.inspect
|
173
173
|
x1, y1, x2, y2 = searchgeo.split(',').collect(&:to_f)
|
174
|
+
#Since we get the query coordinates and not pixels, we have to assume a certain scale
|
175
|
+
dist = (x1*0.01).abs
|
174
176
|
params = [
|
175
177
|
"FEATURE_COUNT=10",
|
176
178
|
"INFO_FORMAT=application/vnd.ogc.gml", #text/xml
|
177
179
|
"REQUEST=GetFeatureInfo",
|
178
180
|
"SERVICE=WMS",
|
179
|
-
"BBOX=#{x1},#{y1},#{x1
|
180
|
-
"WIDTH=
|
181
|
-
"HEIGHT=
|
181
|
+
"BBOX=#{x1},#{y1},#{x1+dist},#{y1+dist}",
|
182
|
+
"WIDTH=100",
|
183
|
+
"HEIGHT=100",
|
182
184
|
"X=0",
|
183
|
-
"Y=
|
185
|
+
"Y=99"
|
184
186
|
]
|
185
187
|
url = "#{table}&#{params.join('&')}"
|
186
188
|
logger.debug "*** Cascaded GetFeatureInfo: #{url}"
|
data/app/models/topic.rb
CHANGED
@@ -127,6 +127,20 @@ class Topic < ActiveRecord::Base
|
|
127
127
|
end
|
128
128
|
end
|
129
129
|
|
130
|
+
#header template
|
131
|
+
def self.query_header_fname
|
132
|
+
"_query_header.html.erb"
|
133
|
+
end
|
134
|
+
|
135
|
+
def self.query_header_file
|
136
|
+
File.join(Rails.root, 'app', 'views', 'topics', query_header_fname)
|
137
|
+
end
|
138
|
+
|
139
|
+
def self.query_header
|
140
|
+
@query_header ||= File.exist?(query_header_file) ? "topics/#{query_header_fname[1..-10]}" : nil
|
141
|
+
end
|
142
|
+
|
143
|
+
#header template for each topic
|
130
144
|
def info_header_fname
|
131
145
|
"_#{name.downcase}_info.html.erb"
|
132
146
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
<%= render :partial => Topic.query_header if Topic.query_header %>
|
2
2
|
<% @query_topics.each do |query_topic| %>
|
3
3
|
<% @topic = query_topic['topicobj'] %>
|
4
4
|
<% @results = query_topic['results'] %>
|
@@ -0,0 +1,37 @@
|
|
1
|
+
$:.push File.expand_path("../lib", __FILE__)
|
2
|
+
|
3
|
+
require "gb_mapfish_appserver/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "gb_mapfish_appserver"
|
7
|
+
s.version = GbMapfishAppserver::VERSION
|
8
|
+
s.authors = ["Pirmin Kalberer"]
|
9
|
+
s.email = ["pka@sourcepole.ch"]
|
10
|
+
s.homepage = "http://mapfish-appserver.github.io/"
|
11
|
+
s.summary = "Mapfish application server."
|
12
|
+
s.description = "Mapfish Appserver is a framework for web mapping applications using OGC standards and the Mapfish protocol."
|
13
|
+
|
14
|
+
s.files = `git ls-files`.split($/)
|
15
|
+
s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
16
|
+
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
17
|
+
|
18
|
+
s.add_dependency "rails", "~> 3.2.13"
|
19
|
+
s.add_dependency "json"
|
20
|
+
s.add_dependency "acts_as_tree", "0.2.0"
|
21
|
+
|
22
|
+
s.add_dependency "devise", "2.0.4"
|
23
|
+
s.add_dependency "cancan", "1.6.7"
|
24
|
+
|
25
|
+
s.add_dependency "rails_admin", "0.0.5"
|
26
|
+
s.add_dependency "fastercsv"# required for rails_admin and Ruby <= 1.8
|
27
|
+
|
28
|
+
s.add_dependency "GeoRuby", ">= 0.1.4" #used for reading envelope, e.g. in GeoModel#bbox
|
29
|
+
|
30
|
+
s.add_dependency "rgeo", "0.3.20"
|
31
|
+
s.add_dependency "rgeo-geojson", "0.2.1"
|
32
|
+
|
33
|
+
s.add_dependency "hpricot" # Cascaded WMS FeatureInfo parsing
|
34
|
+
|
35
|
+
s.add_dependency "pg", "0.14.0"
|
36
|
+
s.add_dependency "activerecord-postgis-adapter", "0.4.1"
|
37
|
+
end
|
@@ -100,6 +100,10 @@ PRINT_URL = nil #'http://localhost:8080/print-servlet-1.1/pdf/print.pdf'
|
|
100
100
|
directory "../../../../../lib/tasks/templates", "lib/tasks/templates", :verbose => false
|
101
101
|
end
|
102
102
|
|
103
|
+
def add_query_header_template
|
104
|
+
create_file "app/views/topisc/_query_header.html.erb", ""
|
105
|
+
end
|
106
|
+
|
103
107
|
end
|
104
108
|
end
|
105
109
|
end
|
data/lib/tasks/mapfile.rake
CHANGED
@@ -51,13 +51,13 @@ namespace :mapfile do
|
|
51
51
|
topic.main_layer = true if topic.main_layer.nil?
|
52
52
|
topic.save!
|
53
53
|
|
54
|
-
topic.topics_layers.destroy_all
|
55
|
-
topic.categories_topics.destroy_all
|
56
54
|
Layer.unused.destroy_all
|
57
55
|
SublayerGroup.unused.destroy_all
|
58
56
|
|
59
57
|
category = @map.web.metadata['gb_category'] || 'Uncategorized'
|
60
|
-
topic.categories
|
58
|
+
if topic.categories.empty?
|
59
|
+
topic.categories << Category.find_or_create_by_title(category)
|
60
|
+
end
|
61
61
|
|
62
62
|
sublayer_groups = {}
|
63
63
|
|
@@ -143,8 +143,9 @@ namespace :mapfile do
|
|
143
143
|
#Info & Legend
|
144
144
|
mkdir_p File.dirname(layer.info_file_auto)
|
145
145
|
|
146
|
+
display_only = (mlayer.type == MS_LAYER_RASTER && mlayer.connectiontype != MS_WMS) || mlayer.type == MS_LAYER_ANNOTATION
|
146
147
|
if queryable
|
147
|
-
if
|
148
|
+
if display_only
|
148
149
|
puts "Warning: Raster/Anntotation layer '#{layer.name}' is queryable (TEMPLATE #{mlayer.template})"
|
149
150
|
end
|
150
151
|
#puts "Creating #{layer.info_file_auto}"
|
@@ -156,7 +157,7 @@ namespace :mapfile do
|
|
156
157
|
layer.alias_fields.split(',')
|
157
158
|
end
|
158
159
|
infotab_template = "_infotable_auto"
|
159
|
-
template = File.open(File.join(
|
160
|
+
template = File.open(File.join(Rails.root, 'lib', 'tasks', 'templates', "#{infotab_template}.html.erb")).read
|
160
161
|
template = ERB.new(template, nil, '<>')
|
161
162
|
File.open(layer.info_file_auto, 'w') do |file|
|
162
163
|
file << template.result(binding)
|
@@ -166,7 +167,7 @@ namespace :mapfile do
|
|
166
167
|
# Layer legend
|
167
168
|
legend_icon_path = File.join(Rails.root, 'public', 'images', 'custom', topic_name.downcase)
|
168
169
|
mkdir_p legend_icon_path
|
169
|
-
if
|
170
|
+
if !display_only
|
170
171
|
#puts "Creating #{layer.legend_file_auto}"
|
171
172
|
File.open(layer.legend_file_auto, 'w') do |file|
|
172
173
|
file << "<table class='legtab'>\n"
|
@@ -213,12 +214,15 @@ namespace :mapfile do
|
|
213
214
|
end
|
214
215
|
|
215
216
|
#topics_layers
|
216
|
-
tl = topic.topics_layers.build(:layer => layer)
|
217
|
+
tl = topic.topics_layers.where(:layer_id => layer).first || topic.topics_layers.build(:layer => layer)
|
217
218
|
tl.queryable = queryable
|
218
219
|
tl.visini = mlayer.status == MS_ON
|
219
220
|
tl.wms_sort = layerno
|
220
|
-
|
221
|
-
tl.
|
221
|
+
#Do now overwrite values changed manually in the DB:
|
222
|
+
tl.leg_sort = mlayer.metadata['gb_leg_sort'] if mlayer.metadata['gb_leg_sort']
|
223
|
+
tl.toc_sort = mlayer.metadata['gb_toc_sort'] if mlayer.metadata['gb_toc_sort']
|
224
|
+
tl.leg_sort ||= layerno*100
|
225
|
+
tl.toc_sort ||= layerno*100
|
222
226
|
tl.save!
|
223
227
|
end
|
224
228
|
|
@@ -9,14 +9,12 @@
|
|
9
9
|
<% aliases.each_with_index do |title, i| %>
|
10
10
|
<td class="tabtitle"><%= title %></td>
|
11
11
|
<% end %>
|
12
|
-
<td class="tabtitle">Markieren</td>
|
13
12
|
</tr>
|
14
13
|
<%% for feature in features do -%>
|
15
14
|
<tr>
|
16
15
|
<% fields.each_with_index do |field, i| %>
|
17
16
|
<td class="tabcell"><%%= feature.<%= field %> %></td>
|
18
17
|
<% end %>
|
19
|
-
<td class="tabcell"><a class="markfeature" href="Javascript:showID('<%= layer.name %>','<%= layer.pkey %>','<%= layer.pkey %>','','<%%= feature.<%= layer.pkey %> %>')" id="show-<%= layer.name %>-<%%= feature.<%= layer.pkey %> %>" data-topic="<%= topic_name %>" data-layer="<%= layer.name %>" data-pkey="<%= layer.pkey %>" data-id="<%%= feature.<%= layer.pkey %> %>" data-minx="<%%= feature.bbox[0] %>" data-miny="<%%= feature.bbox[1] %>" data-maxx="<%%= feature.bbox[2] %>" data-maxy="<%%= feature.bbox[3] %>">In Karte markieren</a></td>
|
20
18
|
</tr>
|
21
19
|
<%% end %>
|
22
20
|
</table>
|
@@ -29,15 +27,6 @@
|
|
29
27
|
<%% end %>
|
30
28
|
</tr>
|
31
29
|
<% end %>
|
32
|
-
<tr><td class="tabtitle">Markieren</td>
|
33
|
-
<%% for feature in features do -%>
|
34
|
-
<td class="tabcell"><a class="markfeature" href="Javascript:showID('<%= layer.name %>','<%= layer.pkey %>','<%= layer.pkey %>','','<%%= feature.<%= layer.pkey %> %>')" id="show-<%= layer.name %>-<%%= feature.<%= layer.pkey %> %>" data-topic="<%= topic_name %>" data-layer="<%= layer.name %>" data-pkey="<%= layer.pkey %>" data-id="<%%= feature.<%= layer.pkey %> %>" data-minx="<%%= feature.bbox[0] %>" data-miny="<%%= feature.bbox[1] %>" data-maxx="<%%= feature.bbox[2] %>" data-maxy="<%%= feature.bbox[3] %>">In Karte markieren</a></td>
|
35
|
-
<%% end %>
|
36
|
-
</tr>
|
37
30
|
</table>
|
38
31
|
<%% end %>
|
39
32
|
<% end %>
|
40
|
-
<%% if features.size > 1 -%>
|
41
|
-
<%% values = features.collect(&:<%= layer.pkey %>).join('$') %>
|
42
|
-
<a class="markfeature" href="Javascript:showID('<%= layer.name %>','<%= layer.pkey %>','<%= layer.pkey %>','','<%%= values %>')" id="show-<%= layer.name %>-<%%= values %>" data-topic="<%= topic_name %>" data-layer="<%= layer.name %>" data-pkey="<%= layer.pkey %>" data-id="<%%= values %>" data-minx="<%%= feature.bbox[0] %>" data-miny="<%%= feature.bbox[1] %>" data-maxx="<%%= feature.bbox[2] %>" data-maxy="<%%= feature.bbox[3] %>">In Karte markieren</a>
|
43
|
-
<%% end -%>
|
data/script/rails
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
#!/usr/bin/env ruby1.9.1
|
2
|
+
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
|
3
|
+
|
4
|
+
ENGINE_ROOT = File.expand_path('../..', __FILE__)
|
5
|
+
ENGINE_PATH = File.expand_path('../../lib/gb_mapfish_appserver/engine', __FILE__)
|
6
|
+
|
7
|
+
require 'rails/all'
|
8
|
+
require 'rails/engine/commands'
|
File without changes
|
File without changes
|
@@ -2,14 +2,12 @@
|
|
2
2
|
<table class="infotab">
|
3
3
|
<tr>
|
4
4
|
<td class="tabtitle">Country</td>
|
5
|
-
<td class="tabtitle">
|
6
|
-
<td class="tabtitle">Markieren</td>
|
5
|
+
<td class="tabtitle">Short</td>
|
7
6
|
</tr>
|
8
7
|
<% for feature in features do -%>
|
9
8
|
<tr>
|
10
|
-
<td class="tabcell"><%= feature.sovereignt %></td>
|
11
|
-
<td class="tabcell"><%= feature.sov_a3 %></td>
|
12
|
-
<td class="tabcell"><a class="markfeature" href="Javascript:showID('cascaded','','','','<%= feature. %>')" id="show-cascaded-<%= feature. %>" data-topic="cascadingwms" data-layer="cascaded" data-pkey="" data-id="<%= feature. %>" data-minx="<%= feature.bbox[0] %>" data-miny="<%= feature.bbox[1] %>" data-maxx="<%= feature.bbox[2] %>" data-maxy="<%= feature.bbox[3] %>">In Karte markieren</a></td>
|
9
|
+
<td class="tabcell"><%= feature.ne:sovereignt %></td>
|
10
|
+
<td class="tabcell"><%= feature.ne:sov_a3 %></td>
|
13
11
|
</tr>
|
14
12
|
<% end %>
|
15
13
|
</table>
|
@@ -17,22 +15,13 @@
|
|
17
15
|
<table class="infotab">
|
18
16
|
<tr><td class="tabtitle">Country</td>
|
19
17
|
<% for feature in features do -%>
|
20
|
-
<td class="tabcell"><%= feature.sovereignt %></td>
|
18
|
+
<td class="tabcell"><%= feature.ne:sovereignt %></td>
|
21
19
|
<% end %>
|
22
20
|
</tr>
|
23
|
-
<tr><td class="tabtitle">
|
21
|
+
<tr><td class="tabtitle">Short</td>
|
24
22
|
<% for feature in features do -%>
|
25
|
-
<td class="tabcell"><%= feature.sov_a3 %></td>
|
26
|
-
<% end %>
|
27
|
-
</tr>
|
28
|
-
<tr><td class="tabtitle">Markieren</td>
|
29
|
-
<% for feature in features do -%>
|
30
|
-
<td class="tabcell"><a class="markfeature" href="Javascript:showID('cascaded','','','','<%= feature. %>')" id="show-cascaded-<%= feature. %>" data-topic="cascadingwms" data-layer="cascaded" data-pkey="" data-id="<%= feature. %>" data-minx="<%= feature.bbox[0] %>" data-miny="<%= feature.bbox[1] %>" data-maxx="<%= feature.bbox[2] %>" data-maxy="<%= feature.bbox[3] %>">In Karte markieren</a></td>
|
23
|
+
<td class="tabcell"><%= feature.ne:sov_a3 %></td>
|
31
24
|
<% end %>
|
32
25
|
</tr>
|
33
26
|
</table>
|
34
27
|
<% end %>
|
35
|
-
<% if features.size > 1 -%>
|
36
|
-
<% values = features.collect(&:).join('$') %>
|
37
|
-
<a class="markfeature" href="Javascript:showID('cascaded','','','','<%= values %>')" id="show-cascaded-<%= values %>" data-topic="cascadingwms" data-layer="cascaded" data-pkey="" data-id="<%= values %>" data-minx="<%= feature.bbox[0] %>" data-miny="<%= feature.bbox[1] %>" data-maxx="<%= feature.bbox[2] %>" data-maxy="<%= feature.bbox[3] %>">In Karte markieren</a>
|
38
|
-
<% end -%>
|
@@ -3,13 +3,11 @@
|
|
3
3
|
<tr>
|
4
4
|
<td class="tabtitle">Name</td>
|
5
5
|
<td class="tabtitle">Population</td>
|
6
|
-
<td class="tabtitle">Markieren</td>
|
7
6
|
</tr>
|
8
7
|
<% for feature in features do -%>
|
9
8
|
<tr>
|
10
9
|
<td class="tabcell"><%= feature.name %></td>
|
11
10
|
<td class="tabcell"><%= feature.pop_est %></td>
|
12
|
-
<td class="tabcell"><a class="markfeature" href="Javascript:showID('countries','ogc_fid','ogc_fid','','<%= feature.ogc_fid %>')" id="show-countries-<%= feature.ogc_fid %>" data-topic="cascadingwms" data-layer="countries" data-pkey="ogc_fid" data-id="<%= feature.ogc_fid %>" data-minx="<%= feature.bbox[0] %>" data-miny="<%= feature.bbox[1] %>" data-maxx="<%= feature.bbox[2] %>" data-maxy="<%= feature.bbox[3] %>">In Karte markieren</a></td>
|
13
11
|
</tr>
|
14
12
|
<% end %>
|
15
13
|
</table>
|
@@ -25,14 +23,5 @@
|
|
25
23
|
<td class="tabcell"><%= feature.pop_est %></td>
|
26
24
|
<% end %>
|
27
25
|
</tr>
|
28
|
-
<tr><td class="tabtitle">Markieren</td>
|
29
|
-
<% for feature in features do -%>
|
30
|
-
<td class="tabcell"><a class="markfeature" href="Javascript:showID('countries','ogc_fid','ogc_fid','','<%= feature.ogc_fid %>')" id="show-countries-<%= feature.ogc_fid %>" data-topic="cascadingwms" data-layer="countries" data-pkey="ogc_fid" data-id="<%= feature.ogc_fid %>" data-minx="<%= feature.bbox[0] %>" data-miny="<%= feature.bbox[1] %>" data-maxx="<%= feature.bbox[2] %>" data-maxy="<%= feature.bbox[3] %>">In Karte markieren</a></td>
|
31
|
-
<% end %>
|
32
|
-
</tr>
|
33
26
|
</table>
|
34
27
|
<% end %>
|
35
|
-
<% if features.size > 1 -%>
|
36
|
-
<% values = features.collect(&:ogc_fid).join('$') %>
|
37
|
-
<a class="markfeature" href="Javascript:showID('countries','ogc_fid','ogc_fid','','<%= values %>')" id="show-countries-<%= values %>" data-topic="cascadingwms" data-layer="countries" data-pkey="ogc_fid" data-id="<%= values %>" data-minx="<%= feature.bbox[0] %>" data-miny="<%= feature.bbox[1] %>" data-maxx="<%= feature.bbox[2] %>" data-maxy="<%= feature.bbox[3] %>">In Karte markieren</a>
|
38
|
-
<% end -%>
|
@@ -3,13 +3,11 @@
|
|
3
3
|
<tr>
|
4
4
|
<td class="tabtitle">Name</td>
|
5
5
|
<td class="tabtitle">Population</td>
|
6
|
-
<td class="tabtitle">Markieren</td>
|
7
6
|
</tr>
|
8
7
|
<% for feature in features do -%>
|
9
8
|
<tr>
|
10
9
|
<td class="tabcell"><%= feature.name %></td>
|
11
10
|
<td class="tabcell"><%= feature.pop_est %></td>
|
12
|
-
<td class="tabcell"><a class="markfeature" href="Javascript:showID('countries','ogc_fid','ogc_fid','','<%= feature.ogc_fid %>')" id="show-countries-<%= feature.ogc_fid %>" data-topic="naturalearth" data-layer="countries" data-pkey="ogc_fid" data-id="<%= feature.ogc_fid %>" data-minx="<%= feature.bbox[0] %>" data-miny="<%= feature.bbox[1] %>" data-maxx="<%= feature.bbox[2] %>" data-maxy="<%= feature.bbox[3] %>">In Karte markieren</a></td>
|
13
11
|
</tr>
|
14
12
|
<% end %>
|
15
13
|
</table>
|
@@ -25,14 +23,5 @@
|
|
25
23
|
<td class="tabcell"><%= feature.pop_est %></td>
|
26
24
|
<% end %>
|
27
25
|
</tr>
|
28
|
-
<tr><td class="tabtitle">Markieren</td>
|
29
|
-
<% for feature in features do -%>
|
30
|
-
<td class="tabcell"><a class="markfeature" href="Javascript:showID('countries','ogc_fid','ogc_fid','','<%= feature.ogc_fid %>')" id="show-countries-<%= feature.ogc_fid %>" data-topic="naturalearth" data-layer="countries" data-pkey="ogc_fid" data-id="<%= feature.ogc_fid %>" data-minx="<%= feature.bbox[0] %>" data-miny="<%= feature.bbox[1] %>" data-maxx="<%= feature.bbox[2] %>" data-maxy="<%= feature.bbox[3] %>">In Karte markieren</a></td>
|
31
|
-
<% end %>
|
32
|
-
</tr>
|
33
26
|
</table>
|
34
27
|
<% end %>
|
35
|
-
<% if features.size > 1 -%>
|
36
|
-
<% values = features.collect(&:ogc_fid).join('$') %>
|
37
|
-
<a class="markfeature" href="Javascript:showID('countries','ogc_fid','ogc_fid','','<%= values %>')" id="show-countries-<%= values %>" data-topic="naturalearth" data-layer="countries" data-pkey="ogc_fid" data-id="<%= values %>" data-minx="<%= feature.bbox[0] %>" data-miny="<%= feature.bbox[1] %>" data-maxx="<%= feature.bbox[2] %>" data-maxy="<%= feature.bbox[3] %>">In Karte markieren</a>
|
38
|
-
<% end -%>
|
@@ -2,3 +2,7 @@
|
|
2
2
|
<p class="layer">Countries</p>
|
3
3
|
<%= render :partial => 'layers/custom/cascadingwms/auto/countries_legend', :as => :legend %>
|
4
4
|
</div>
|
5
|
+
<div class="legpart">
|
6
|
+
<p class="layer">Cascaded</p>
|
7
|
+
<%= render :partial => 'layers/custom/cascadingwms/auto/cascaded_legend', :as => :legend %>
|
8
|
+
</div>
|
File without changes
|
File without changes
|
@@ -9,14 +9,12 @@
|
|
9
9
|
<% aliases.each_with_index do |title, i| %>
|
10
10
|
<td class="tabtitle"><%= title %></td>
|
11
11
|
<% end %>
|
12
|
-
<td class="tabtitle">Markieren</td>
|
13
12
|
</tr>
|
14
13
|
<%% for feature in features do -%>
|
15
14
|
<tr>
|
16
15
|
<% fields.each_with_index do |field, i| %>
|
17
16
|
<td class="tabcell"><%%= feature.<%= field %> %></td>
|
18
17
|
<% end %>
|
19
|
-
<td class="tabcell"><a class="markfeature" href="Javascript:showID('<%= layer.name %>','<%= layer.pkey %>','<%= layer.pkey %>','','<%%= feature.<%= layer.pkey %> %>')" id="show-<%= layer.name %>-<%%= feature.<%= layer.pkey %> %>" data-topic="<%= topic_name %>" data-layer="<%= layer.name %>" data-pkey="<%= layer.pkey %>" data-id="<%%= feature.<%= layer.pkey %> %>" data-minx="<%%= feature.bbox[0] %>" data-miny="<%%= feature.bbox[1] %>" data-maxx="<%%= feature.bbox[2] %>" data-maxy="<%%= feature.bbox[3] %>">In Karte markieren</a></td>
|
20
18
|
</tr>
|
21
19
|
<%% end %>
|
22
20
|
</table>
|
@@ -29,15 +27,6 @@
|
|
29
27
|
<%% end %>
|
30
28
|
</tr>
|
31
29
|
<% end %>
|
32
|
-
<tr><td class="tabtitle">Markieren</td>
|
33
|
-
<%% for feature in features do -%>
|
34
|
-
<td class="tabcell"><a class="markfeature" href="Javascript:showID('<%= layer.name %>','<%= layer.pkey %>','<%= layer.pkey %>','','<%%= feature.<%= layer.pkey %> %>')" id="show-<%= layer.name %>-<%%= feature.<%= layer.pkey %> %>" data-topic="<%= topic_name %>" data-layer="<%= layer.name %>" data-pkey="<%= layer.pkey %>" data-id="<%%= feature.<%= layer.pkey %> %>" data-minx="<%%= feature.bbox[0] %>" data-miny="<%%= feature.bbox[1] %>" data-maxx="<%%= feature.bbox[2] %>" data-maxy="<%%= feature.bbox[3] %>">In Karte markieren</a></td>
|
35
|
-
<%% end %>
|
36
|
-
</tr>
|
37
30
|
</table>
|
38
31
|
<%% end %>
|
39
32
|
<% end %>
|
40
|
-
<%% if features.size > 1 -%>
|
41
|
-
<%% values = features.collect(&:<%= layer.pkey %>).join('$') %>
|
42
|
-
<a class="markfeature" href="Javascript:showID('<%= layer.name %>','<%= layer.pkey %>','<%= layer.pkey %>','','<%%= values %>')" id="show-<%= layer.name %>-<%%= values %>" data-topic="<%= topic_name %>" data-layer="<%= layer.name %>" data-pkey="<%= layer.pkey %>" data-id="<%%= values %>" data-minx="<%%= feature.bbox[0] %>" data-miny="<%%= feature.bbox[1] %>" data-maxx="<%%= feature.bbox[2] %>" data-maxy="<%%= feature.bbox[3] %>">In Karte markieren</a>
|
43
|
-
<%% end -%>
|