mapplz 0.1.8 → 0.1.9
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.
- checksums.yaml +4 -4
- data/lib/mapplz.rb +7 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 497cc4ecc99a2fe44aa093f5ad16fc0f88911659
|
4
|
+
data.tar.gz: 7f8fb2724484da0f0dcb803bf2b8320c2b6c0748
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d6e7ad12fa056fcdb32d7aaef8f31a079e8c7c16d6c16fc685018d3af9ed7b51e335852621e8c29b9dd9984eecce4c5546b1cc6a9229825b4418354393634db7
|
7
|
+
data.tar.gz: f0194bd33886d2b7fb9a09b7ebf4a660bedd3566d53fc95c1da07b77c0163f08474fe60528735e61e18a21761db3e5e26ccce2fc1d9b971568c36f5ff3739afb
|
data/lib/mapplz.rb
CHANGED
@@ -108,7 +108,7 @@ class MapPLZ
|
|
108
108
|
|
109
109
|
conditions = parse_sql(where_clause, add_on = nil)
|
110
110
|
conditions.each do |condition|
|
111
|
-
where_prop = condition[:field]
|
111
|
+
where_prop = condition[:field].to_s
|
112
112
|
where_clause = where_clause.gsub(where_prop, "json_extract_path_text(properties, '#{where_prop}')")
|
113
113
|
end
|
114
114
|
|
@@ -160,10 +160,10 @@ class MapPLZ
|
|
160
160
|
|
161
161
|
def render_html(options = {})
|
162
162
|
my_embed = embed_html(options)
|
163
|
-
|
163
|
+
my_embed = "<!DOCTYPE html>
|
164
164
|
<html>
|
165
165
|
<head>
|
166
|
-
<style type
|
166
|
+
<style type=\"text/css\">
|
167
167
|
html, body, #map {
|
168
168
|
width: 100%;
|
169
169
|
height: 100%;
|
@@ -171,13 +171,14 @@ class MapPLZ
|
|
171
171
|
padding: 0;
|
172
172
|
}
|
173
173
|
</style>
|
174
|
-
<script type
|
175
|
-
<link href
|
174
|
+
<script type=\"text/javascript\" src=\"http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js\"></script>
|
175
|
+
<link href=\"http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css\" rel=\"stylesheet\" type=\"text/css\"/>
|
176
176
|
</head>
|
177
177
|
<body>
|
178
178
|
#{my_embed}
|
179
179
|
</body>
|
180
|
-
</html
|
180
|
+
</html>"
|
181
|
+
my_embed
|
181
182
|
end
|
182
183
|
|
183
184
|
def embed_html(options = {})
|