Skip to content

Instantly share code, notes, and snippets.

@spinscale
Last active November 26, 2023 15:14
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save spinscale/544e854d2e16941cfbafdd53f80eb4f1 to your computer and use it in GitHub Desktop.
Save spinscale/544e854d2e16941cfbafdd53f80eb4f1 to your computer and use it in GitHub Desktop.
Visualizing the unofficial autobahn API into the Elastic Stack
# autobahn-api-to-es
#
# Indexes autobahn API metadata into Elasticsearch to use it with Kibana Maps
#
# Original API description https://gist.github.com/LilithWittmann/06bd153317b635e7b622651f5cfd95ea
#
#
# MIT License
#
# Copyright (c) [2021]
#
# 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.
#
# autobahn-api-to-es
#
# Prerequisite: You need to install crystal locally.
# See https://crystal-lang.org/install/
#
# Run this via
#
# crystal authobahn-api-to-es -- -d ./data
#
# Possible arguments
# -d --directory: Allows to specify a data directory to store the JSON in. The
# basic idea of this is to not query the endpoints too often. Of course you
# need to requery for current closures or warnings if you want to stay
# up-to-date. I used this for 1x indexing and thus added this mechanism. If you
# don't need it, just specify a new directory with every run
# -e --elasticsearch: Specifies the Elasticsearch endpoint to index into.
# Must be an URI like https://user:pass@example.org that can also contain
# HTTP Basic Auth information. By default this assumes a local Elasticsearch
# installation running at http://localhost:9200
#
# This is a fast written tool without too much error handling. So feel free to
# add this yourself.
#
#
###########################
# Import Kibana Dashboard #
###########################
#
# The 'dashboard.json' file contains a ready made dashboard with a map, where each
# to the types can be visualized
#
# Import via (when run via localhost!):
#
# curl -v -X POST -d @../dashboard.json 'localhost:5601/api/kibana/dashboards/import' --header "kbn-xsrf: true" --header "Content-Type: application/json"
#
# Happy visualizing
#
require "http/client"
require "json"
require "option_parser"
directory = "./data"
elasticsearch_endpoint = URI.parse "http://localhost:9200"
OptionParser.parse do |parser|
parser.banner = "Usage: autobahn-api-to-es [arguments]"
parser.on("-d", "--directory", "Directory to dump the JSON into, default [#{directory}]") { |d| directory = d }
parser.on("-e", "--elasticsearch", "Elasticsearch endpoint, must be an URI, may contain a user:password like https://user:pass@example.org, default [#{elasticsearch_endpoint}]") { |e| elasticsearch_endpoint = URI.parse e }
parser.on("-h", "--help", "Show this help") do
puts parser
exit
end
parser.invalid_option do |flag|
STDERR.puts "ERROR: #{flag} is not a valid option."
STDERR.puts parser
exit(1)
end
end
directory = directory.chomp "/"
# create data directory
Dir.mkdir_p directory
client = HTTP::Client.new URI.parse "https://verkehr.autobahn.de/"
es_client = HTTP::Client.new elasticsearch_endpoint
es_headers = HTTP::Headers{"Content-Type" => "application/x-ndjson"}
def read_from_file_or_retrieve(endpoint : String, directory : String, client : HTTP::Client)
endpoint_as_file = endpoint.gsub "/", "_"
path = "#{directory}/#{endpoint_as_file}.json"
if !File.exists?(path)
response = client.get endpoint
File.write path, response.body
JSON.parse response.body
else
JSON.parse File.read path
end
end
def process_json_documents (key : String, type : String, bulk : String::Builder, json : JSON::Any)
json[key].as_a.each do |obj|
# set a type to filter out in queries
obj.as_h["type"] = JSON::Any.new type
bulk << %Q({ "index" : { "_id": "#{obj["identifier"].as_s}" }}\n)
# move 'long' longitude to 'lon' to create elasticsearch geo_point properly
obj["coordinate"].as_h["lon"] = obj["coordinate"]["long"]
obj["coordinate"].as_h.delete "long"
bulk << obj.to_json
bulk << "\n"
end
end
# recreate elasticsearch indices
mappings = %Q({"mappings":{"properties":{"coordinate":{"type":"geo_point"}}}})
es_client.delete "autobahn", headers: es_headers
es_client.put "autobahn", body: mappings, headers: es_headers
# retrieve data from highways that can be queried
roads = read_from_file_or_retrieve "/o/autobahn", directory, client
roads["roads"].as_a.each_with_index do |road, idx|
# remove the slash like in A1/A59
name = road.as_s.gsub "/", ""
STDOUT.print "Retrieving data #{name}... "
charging_stations = read_from_file_or_retrieve "/o/autobahn/#{name}/services/electric_charging_station", directory, client
roadworks = read_from_file_or_retrieve "/o/autobahn/#{name}/services/roadworks", directory, client
closures = read_from_file_or_retrieve "/o/autobahn/#{name}/services/closure", directory, client
webcams = read_from_file_or_retrieve "/o/autobahn/#{name}/services/webcam", directory, client
warnings = read_from_file_or_retrieve "/o/autobahn/#{name}/services/warning", directory, client
parkings = read_from_file_or_retrieve "/o/autobahn/#{name}/services/parking_lorry", directory, client
es_body = String.build do |bulk|
process_json_documents "electric_charging_station", "electric_charging_station", bulk, charging_stations
process_json_documents "roadworks", "roadwork", bulk, roadworks
process_json_documents "closure", "closure", bulk, closures
process_json_documents "webcam", "webcam", bulk, webcams
process_json_documents "warning", "warning", bulk, warnings
process_json_documents "parking_lorry", "parking_lorry", bulk, parkings
end
# only sent if any data has been added!
STDOUT.print "indexing... "
if !es_body.empty?
response = es_client.post "/autobahn/_bulk", body: es_body, headers: es_headers
STDOUT.print "✅\n"
else
STDOUT.print "❌ no data...\n"
end
# useful for debugging, if you only need the first highway and then want to exit
#break if idx == 0
end
{
"version": "7.13.4",
"objects": [
{
"id": "f691b650-eaca-11eb-83ee-37a2214361e1",
"type": "dashboard",
"namespaces": [
"default"
],
"updated_at": "2021-07-22T08:58:34.781Z",
"version": "WzM5OSwyXQ==",
"attributes": {
"title": "Autobahn",
"hits": 0,
"description": "",
"panelsJSON": "[{\"version\":\"7.13.4\",\"type\":\"map\",\"gridData\":{\"x\":0,\"y\":0,\"w\":48,\"h\":37,\"i\":\"89e501af-a1d0-4f36-aeb2-6e03fd015cf2\"},\"panelIndex\":\"89e501af-a1d0-4f36-aeb2-6e03fd015cf2\",\"embeddableConfig\":{\"attributes\":{\"title\":\"German Autobahn Maps\",\"description\":\"\",\"layerListJSON\":\"[{\\\"sourceDescriptor\\\":{\\\"type\\\":\\\"EMS_TMS\\\",\\\"isAutoSelect\\\":true},\\\"id\\\":\\\"3bf969c6-8b1d-4097-90d4-b1c528a229c9\\\",\\\"label\\\":null,\\\"minZoom\\\":0,\\\"maxZoom\\\":24,\\\"alpha\\\":1,\\\"visible\\\":true,\\\"style\\\":{\\\"type\\\":\\\"TILE\\\"},\\\"type\\\":\\\"VECTOR_TILE\\\"},{\\\"sourceDescriptor\\\":{\\\"indexPatternId\\\":\\\"aa0ad440-eac7-11eb-83ee-37a2214361e1\\\",\\\"geoField\\\":\\\"coordinate\\\",\\\"filterByMapBounds\\\":true,\\\"scalingType\\\":\\\"CLUSTERS\\\",\\\"id\\\":\\\"b9cb7b9c-4f82-41a3-821b-598fb623fcf2\\\",\\\"type\\\":\\\"ES_SEARCH\\\",\\\"applyGlobalQuery\\\":true,\\\"applyGlobalTime\\\":true,\\\"tooltipProperties\\\":[\\\"title\\\",\\\"subtitle\\\",\\\"description\\\"],\\\"sortField\\\":\\\"\\\",\\\"sortOrder\\\":\\\"desc\\\",\\\"topHitsSplitField\\\":\\\"\\\",\\\"topHitsSize\\\":1},\\\"id\\\":\\\"575dd926-a754-4722-a051-5999720ea427\\\",\\\"label\\\":\\\"Parking\\\",\\\"minZoom\\\":0,\\\"maxZoom\\\":24,\\\"alpha\\\":0.75,\\\"visible\\\":true,\\\"style\\\":{\\\"type\\\":\\\"VECTOR\\\",\\\"properties\\\":{\\\"icon\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"value\\\":\\\"parking\\\"}},\\\"fillColor\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"color\\\":\\\"#00b7ff\\\"}},\\\"lineColor\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"color\\\":\\\"#41937c\\\"}},\\\"lineWidth\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"size\\\":0}},\\\"iconSize\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"size\\\":8}},\\\"iconOrientation\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"orientation\\\":0}},\\\"labelText\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"value\\\":\\\"\\\"}},\\\"labelColor\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"color\\\":\\\"#000000\\\"}},\\\"labelSize\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"size\\\":14}},\\\"labelBorderColor\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"color\\\":\\\"#FFFFFF\\\"}},\\\"symbolizeAs\\\":{\\\"options\\\":{\\\"value\\\":\\\"icon\\\"}},\\\"labelBorderSize\\\":{\\\"options\\\":{\\\"size\\\":\\\"SMALL\\\"}}},\\\"isTimeAware\\\":true},\\\"type\\\":\\\"BLENDED_VECTOR\\\",\\\"joins\\\":[],\\\"query\\\":{\\\"query\\\":\\\"type.keyword :\\\\\\\"parking_lorry\\\\\\\" \\\",\\\"language\\\":\\\"kuery\\\"}},{\\\"sourceDescriptor\\\":{\\\"indexPatternId\\\":\\\"aa0ad440-eac7-11eb-83ee-37a2214361e1\\\",\\\"geoField\\\":\\\"coordinate\\\",\\\"filterByMapBounds\\\":true,\\\"scalingType\\\":\\\"CLUSTERS\\\",\\\"id\\\":\\\"58b96785-7c94-43fb-9da8-f3468c3f06ad\\\",\\\"type\\\":\\\"ES_SEARCH\\\",\\\"applyGlobalQuery\\\":true,\\\"applyGlobalTime\\\":true,\\\"tooltipProperties\\\":[\\\"title\\\",\\\"subtitle\\\",\\\"description\\\"],\\\"sortField\\\":\\\"\\\",\\\"sortOrder\\\":\\\"desc\\\",\\\"topHitsSplitField\\\":\\\"\\\",\\\"topHitsSize\\\":1},\\\"id\\\":\\\"a3e2dd1d-7933-4bf0-9b07-ee77aa706630\\\",\\\"label\\\":\\\"Charging Stations\\\",\\\"minZoom\\\":0,\\\"maxZoom\\\":24,\\\"alpha\\\":0.75,\\\"visible\\\":true,\\\"style\\\":{\\\"type\\\":\\\"VECTOR\\\",\\\"properties\\\":{\\\"icon\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"value\\\":\\\"charging-station\\\"}},\\\"fillColor\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"color\\\":\\\"#ff3434\\\"}},\\\"lineColor\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"color\\\":\\\"#41937c\\\"}},\\\"lineWidth\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"size\\\":0}},\\\"iconSize\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"size\\\":8}},\\\"iconOrientation\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"orientation\\\":0}},\\\"labelText\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"value\\\":\\\"\\\"}},\\\"labelColor\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"color\\\":\\\"#000000\\\"}},\\\"labelSize\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"size\\\":14}},\\\"labelBorderColor\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"color\\\":\\\"#FFFFFF\\\"}},\\\"symbolizeAs\\\":{\\\"options\\\":{\\\"value\\\":\\\"icon\\\"}},\\\"labelBorderSize\\\":{\\\"options\\\":{\\\"size\\\":\\\"SMALL\\\"}}},\\\"isTimeAware\\\":true},\\\"type\\\":\\\"BLENDED_VECTOR\\\",\\\"joins\\\":[],\\\"query\\\":{\\\"query\\\":\\\"type.keyword :\\\\\\\"electric_charging_station\\\\\\\" \\\",\\\"language\\\":\\\"kuery\\\"}},{\\\"sourceDescriptor\\\":{\\\"indexPatternId\\\":\\\"aa0ad440-eac7-11eb-83ee-37a2214361e1\\\",\\\"geoField\\\":\\\"coordinate\\\",\\\"filterByMapBounds\\\":true,\\\"scalingType\\\":\\\"CLUSTERS\\\",\\\"id\\\":\\\"dc1130f7-79f7-4553-8832-6147ec5f676e\\\",\\\"type\\\":\\\"ES_SEARCH\\\",\\\"applyGlobalQuery\\\":true,\\\"applyGlobalTime\\\":true,\\\"tooltipProperties\\\":[\\\"title\\\",\\\"subtitle\\\",\\\"description\\\"],\\\"sortField\\\":\\\"\\\",\\\"sortOrder\\\":\\\"desc\\\",\\\"topHitsSplitField\\\":\\\"\\\",\\\"topHitsSize\\\":1},\\\"id\\\":\\\"be95c258-ffb6-4ed0-a48c-76fd243c7e71\\\",\\\"label\\\":\\\"Roadworks\\\",\\\"minZoom\\\":0,\\\"maxZoom\\\":24,\\\"alpha\\\":0.75,\\\"visible\\\":true,\\\"style\\\":{\\\"type\\\":\\\"VECTOR\\\",\\\"properties\\\":{\\\"icon\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"value\\\":\\\"hardware\\\"}},\\\"fillColor\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"color\\\":\\\"#ffaf1b\\\"}},\\\"lineColor\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"color\\\":\\\"#41937c\\\"}},\\\"lineWidth\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"size\\\":0}},\\\"iconSize\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"size\\\":8}},\\\"iconOrientation\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"orientation\\\":0}},\\\"labelText\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"value\\\":\\\"\\\"}},\\\"labelColor\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"color\\\":\\\"#000000\\\"}},\\\"labelSize\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"size\\\":14}},\\\"labelBorderColor\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"color\\\":\\\"#FFFFFF\\\"}},\\\"symbolizeAs\\\":{\\\"options\\\":{\\\"value\\\":\\\"icon\\\"}},\\\"labelBorderSize\\\":{\\\"options\\\":{\\\"size\\\":\\\"SMALL\\\"}}},\\\"isTimeAware\\\":true},\\\"type\\\":\\\"BLENDED_VECTOR\\\",\\\"joins\\\":[],\\\"query\\\":{\\\"query\\\":\\\"type.keyword : \\\\\\\"roadwork\\\\\\\" \\\",\\\"language\\\":\\\"kuery\\\"}},{\\\"sourceDescriptor\\\":{\\\"indexPatternId\\\":\\\"aa0ad440-eac7-11eb-83ee-37a2214361e1\\\",\\\"geoField\\\":\\\"coordinate\\\",\\\"filterByMapBounds\\\":true,\\\"scalingType\\\":\\\"CLUSTERS\\\",\\\"id\\\":\\\"2978dc2a-042e-4585-a9d3-59abba075e48\\\",\\\"type\\\":\\\"ES_SEARCH\\\",\\\"applyGlobalQuery\\\":true,\\\"applyGlobalTime\\\":true,\\\"tooltipProperties\\\":[\\\"title\\\",\\\"subtitle\\\",\\\"description\\\"],\\\"sortField\\\":\\\"\\\",\\\"sortOrder\\\":\\\"desc\\\",\\\"topHitsSplitField\\\":\\\"\\\",\\\"topHitsSize\\\":1},\\\"id\\\":\\\"ebd7b1d4-82a7-48bf-8542-4510f9739a04\\\",\\\"label\\\":\\\"Webcams\\\",\\\"minZoom\\\":0,\\\"maxZoom\\\":24,\\\"alpha\\\":0.75,\\\"visible\\\":true,\\\"style\\\":{\\\"type\\\":\\\"VECTOR\\\",\\\"properties\\\":{\\\"icon\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"value\\\":\\\"cinema\\\"}},\\\"fillColor\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"color\\\":\\\"#54B399\\\"}},\\\"lineColor\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"color\\\":\\\"#41937c\\\"}},\\\"lineWidth\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"size\\\":0}},\\\"iconSize\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"size\\\":8}},\\\"iconOrientation\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"orientation\\\":0}},\\\"labelText\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"value\\\":\\\"\\\"}},\\\"labelColor\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"color\\\":\\\"#000000\\\"}},\\\"labelSize\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"size\\\":14}},\\\"labelBorderColor\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"color\\\":\\\"#FFFFFF\\\"}},\\\"symbolizeAs\\\":{\\\"options\\\":{\\\"value\\\":\\\"icon\\\"}},\\\"labelBorderSize\\\":{\\\"options\\\":{\\\"size\\\":\\\"SMALL\\\"}}},\\\"isTimeAware\\\":true},\\\"type\\\":\\\"BLENDED_VECTOR\\\",\\\"joins\\\":[],\\\"query\\\":{\\\"query\\\":\\\"type.keyword : \\\\\\\"webcam\\\\\\\" \\\",\\\"language\\\":\\\"kuery\\\"}},{\\\"sourceDescriptor\\\":{\\\"indexPatternId\\\":\\\"aa0ad440-eac7-11eb-83ee-37a2214361e1\\\",\\\"geoField\\\":\\\"coordinate\\\",\\\"filterByMapBounds\\\":true,\\\"scalingType\\\":\\\"CLUSTERS\\\",\\\"id\\\":\\\"21b7c7da-2c7d-4658-af80-0d544cc56a20\\\",\\\"type\\\":\\\"ES_SEARCH\\\",\\\"applyGlobalQuery\\\":true,\\\"applyGlobalTime\\\":true,\\\"tooltipProperties\\\":[\\\"title\\\",\\\"subtitle\\\",\\\"description\\\"],\\\"sortField\\\":\\\"\\\",\\\"sortOrder\\\":\\\"desc\\\",\\\"topHitsSplitField\\\":\\\"\\\",\\\"topHitsSize\\\":1},\\\"id\\\":\\\"ace8b48d-e8ec-47a8-833c-c3e4447d38df\\\",\\\"label\\\":\\\"Warning\\\",\\\"minZoom\\\":0,\\\"maxZoom\\\":24,\\\"alpha\\\":0.75,\\\"visible\\\":true,\\\"style\\\":{\\\"type\\\":\\\"VECTOR\\\",\\\"properties\\\":{\\\"icon\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"value\\\":\\\"danger\\\"}},\\\"fillColor\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"color\\\":\\\"#4e4e4e\\\"}},\\\"lineColor\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"color\\\":\\\"#4379aa\\\"}},\\\"lineWidth\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"size\\\":0}},\\\"iconSize\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"size\\\":8}},\\\"iconOrientation\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"orientation\\\":0}},\\\"labelText\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"value\\\":\\\"\\\"}},\\\"labelColor\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"color\\\":\\\"#000000\\\"}},\\\"labelSize\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"size\\\":14}},\\\"labelBorderColor\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"color\\\":\\\"#FFFFFF\\\"}},\\\"symbolizeAs\\\":{\\\"options\\\":{\\\"value\\\":\\\"icon\\\"}},\\\"labelBorderSize\\\":{\\\"options\\\":{\\\"size\\\":\\\"SMALL\\\"}}},\\\"isTimeAware\\\":true},\\\"type\\\":\\\"BLENDED_VECTOR\\\",\\\"joins\\\":[],\\\"query\\\":{\\\"query\\\":\\\"type.keyword :\\\\\\\"warning\\\\\\\" \\\",\\\"language\\\":\\\"kuery\\\"}},{\\\"sourceDescriptor\\\":{\\\"indexPatternId\\\":\\\"aa0ad440-eac7-11eb-83ee-37a2214361e1\\\",\\\"geoField\\\":\\\"coordinate\\\",\\\"filterByMapBounds\\\":true,\\\"scalingType\\\":\\\"CLUSTERS\\\",\\\"id\\\":\\\"9c458528-4158-4652-a85d-8a4d85b4e5b6\\\",\\\"type\\\":\\\"ES_SEARCH\\\",\\\"applyGlobalQuery\\\":true,\\\"applyGlobalTime\\\":true,\\\"tooltipProperties\\\":[\\\"title\\\",\\\"subtitle\\\",\\\"description\\\"],\\\"sortField\\\":\\\"\\\",\\\"sortOrder\\\":\\\"desc\\\",\\\"topHitsSplitField\\\":\\\"\\\",\\\"topHitsSize\\\":1},\\\"id\\\":\\\"b1c92c19-bd27-4830-b364-8ec26730cad1\\\",\\\"label\\\":\\\"Closure\\\",\\\"minZoom\\\":0,\\\"maxZoom\\\":24,\\\"alpha\\\":0.75,\\\"visible\\\":true,\\\"style\\\":{\\\"type\\\":\\\"VECTOR\\\",\\\"properties\\\":{\\\"icon\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"value\\\":\\\"marker\\\"}},\\\"fillColor\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"color\\\":\\\"#000000\\\"}},\\\"lineColor\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"color\\\":\\\"#41937c\\\"}},\\\"lineWidth\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"size\\\":0}},\\\"iconSize\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"size\\\":8}},\\\"iconOrientation\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"orientation\\\":0}},\\\"labelText\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"value\\\":\\\"\\\"}},\\\"labelColor\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"color\\\":\\\"#000000\\\"}},\\\"labelSize\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"size\\\":14}},\\\"labelBorderColor\\\":{\\\"type\\\":\\\"STATIC\\\",\\\"options\\\":{\\\"color\\\":\\\"#FFFFFF\\\"}},\\\"symbolizeAs\\\":{\\\"options\\\":{\\\"value\\\":\\\"icon\\\"}},\\\"labelBorderSize\\\":{\\\"options\\\":{\\\"size\\\":\\\"SMALL\\\"}}},\\\"isTimeAware\\\":true},\\\"type\\\":\\\"BLENDED_VECTOR\\\",\\\"joins\\\":[],\\\"query\\\":{\\\"query\\\":\\\"type.keyword : \\\\\\\"closure\\\\\\\" \\\",\\\"language\\\":\\\"kuery\\\"}}]\",\"mapStateJSON\":\"{\\\"zoom\\\":5.99,\\\"center\\\":{\\\"lon\\\":11.01043,\\\"lat\\\":51.33053},\\\"timeFilters\\\":{\\\"from\\\":\\\"now-15m\\\",\\\"to\\\":\\\"now\\\"},\\\"refreshConfig\\\":{\\\"isPaused\\\":true,\\\"interval\\\":0},\\\"query\\\":{\\\"query\\\":\\\"\\\",\\\"language\\\":\\\"kuery\\\"},\\\"filters\\\":[],\\\"settings\\\":{\\\"autoFitToDataBounds\\\":false,\\\"backgroundColor\\\":\\\"#ffffff\\\",\\\"disableInteractive\\\":false,\\\"disableTooltipControl\\\":false,\\\"hideToolbarOverlay\\\":false,\\\"hideLayerControl\\\":false,\\\"hideViewControl\\\":false,\\\"initialLocation\\\":\\\"LAST_SAVED_LOCATION\\\",\\\"fixedLocation\\\":{\\\"lat\\\":0,\\\"lon\\\":0,\\\"zoom\\\":2},\\\"browserLocation\\\":{\\\"zoom\\\":2},\\\"maxZoom\\\":24,\\\"minZoom\\\":0,\\\"showScaleControl\\\":false,\\\"showSpatialFilters\\\":true,\\\"spatialFiltersAlpa\\\":0.3,\\\"spatialFiltersFillColor\\\":\\\"#DA8B45\\\",\\\"spatialFiltersLineColor\\\":\\\"#DA8B45\\\"}}\",\"uiStateJSON\":\"{\\\"isLayerTOCOpen\\\":true,\\\"openTOCDetails\\\":[]}\",\"references\":[]},\"mapCenter\":{\"lat\":51.33053,\"lon\":11.01043,\"zoom\":5.99},\"mapBuffer\":{\"minLon\":4.118350000000001,\"minLat\":48.642835,\"maxLon\":17.90251,\"maxLat\":53.979414999999996},\"isLayerTOCOpen\":true,\"openTOCDetails\":[],\"hiddenLayers\":[],\"enhancements\":{}}}]",
"optionsJSON": "{\"hidePanelTitles\":false,\"useMargins\":true}",
"version": 1,
"timeRestore": false,
"kibanaSavedObjectMeta": {
"searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[]}"
}
},
"references": [
{
"name": "89e501af-a1d0-4f36-aeb2-6e03fd015cf2:layer_1_source_index_pattern",
"type": "index-pattern",
"id": "aa0ad440-eac7-11eb-83ee-37a2214361e1"
},
{
"name": "89e501af-a1d0-4f36-aeb2-6e03fd015cf2:layer_2_source_index_pattern",
"type": "index-pattern",
"id": "aa0ad440-eac7-11eb-83ee-37a2214361e1"
},
{
"name": "89e501af-a1d0-4f36-aeb2-6e03fd015cf2:layer_3_source_index_pattern",
"type": "index-pattern",
"id": "aa0ad440-eac7-11eb-83ee-37a2214361e1"
},
{
"name": "89e501af-a1d0-4f36-aeb2-6e03fd015cf2:layer_4_source_index_pattern",
"type": "index-pattern",
"id": "aa0ad440-eac7-11eb-83ee-37a2214361e1"
},
{
"name": "89e501af-a1d0-4f36-aeb2-6e03fd015cf2:layer_5_source_index_pattern",
"type": "index-pattern",
"id": "aa0ad440-eac7-11eb-83ee-37a2214361e1"
},
{
"name": "89e501af-a1d0-4f36-aeb2-6e03fd015cf2:layer_6_source_index_pattern",
"type": "index-pattern",
"id": "aa0ad440-eac7-11eb-83ee-37a2214361e1"
}
],
"migrationVersion": {
"dashboard": "7.13.1"
},
"coreMigrationVersion": "7.13.4"
},
{
"id": "aa0ad440-eac7-11eb-83ee-37a2214361e1",
"type": "index-pattern",
"namespaces": [
"default"
],
"updated_at": "2021-07-22T08:34:43.716Z",
"version": "WzMxNCwyXQ==",
"attributes": {
"fieldAttrs": "{}",
"title": "autobahn",
"fields": "[]",
"runtimeFieldMap": "{}"
},
"references": [],
"migrationVersion": {
"index-pattern": "7.11.0"
},
"coreMigrationVersion": "7.13.4"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment