From 7ceb372e245100f343dff103cb2664eed9ec9ff0 Mon Sep 17 00:00:00 2001 From: Arnoud Buzing Date: Thu, 17 May 2018 15:05:57 -0500 Subject: [PATCH] updates --- Prototypes/GeoGraphics.wl | 80 +++++++++++++++++++++++++++++++++++++++ Prototypes/PacletInfo.m | 4 +- Prototypes/Prototypes.wl | 2 +- Prototypes/Usage.wl | 2 + 4 files changed, 85 insertions(+), 3 deletions(-) create mode 100644 Prototypes/GeoGraphics.wl diff --git a/Prototypes/GeoGraphics.wl b/Prototypes/GeoGraphics.wl new file mode 100644 index 0000000..9615a32 --- /dev/null +++ b/Prototypes/GeoGraphics.wl @@ -0,0 +1,80 @@ +GeoService = <| + "OpenStreetMap" :> RandomChoice[{ + "http://a.tile.openstreetmap.org/`1`/`2`/`3`.png", + "http://b.tile.openstreetmap.org/`1`/`2`/`3`.png", + "http://c.tile.openstreetmap.org/`1`/`2`/`3`.png" + }], + {"OpenStreetMap", "France"} :> RandomChoice[{ + "http://a.tile.openstreetmap.fr/osmfr/`1`/`2`/`3`.png", + "http://b.tile.openstreetmap.fr/osmfr/`1`/`2`/`3`.png", + "http://c.tile.openstreetmap.fr/osmfr/`1`/`2`/`3`.png" + }], + {"OpenStreetMap", "France", "Humanitarian"} :> RandomChoice[{ + "http://a.tile.openstreetmap.fr/hot/`1`/`2`/`3`.png", + "http://b.tile.openstreetmap.fr/hot/`1`/`2`/`3`.png" + }], + "WikiMedia" -> "https://maps.wikimedia.org/osm-intl/`1`/`2`/`3`.png", + "HikeAndBike" -> + "http://toolserver.org/tiles/hikebike/`1`/`2`/`3`.png", + {"WaymarkedTrails", "Hiking"} -> + "https://tile.waymarkedtrails.org/hiking/`1`/`2`/`3`.png", + {"WaymarkedTrails", "Cycling"} -> + "https://tile.waymarkedtrails.org/cycling/`1`/`2`/`3`.png", + "SkiMap" -> "http://tiles.skimap.org/openskimap/`1`/`2`/`3`.png", + "HillShading" -> + "http://c.tiles.wmflabs.org/hillshading/`1`/`2`/`3`.png", + {"OpenCycleMap", "Cycle"} :> RandomChoice[{ + "http://a.tile.opencyclemap.org/cycle/`1`/`2`/`3`.png", + "http://b.tile.opencyclemap.org/cycle/`1`/`2`/`3`.png" + }], + {"OpenCycleMap", "Transport"} :> RandomChoice[{ + "http://a.tile2.opencyclemap.org/transport/`1`/`2`/`3`.png", + "http://a.tile2.opencyclemap.org/transport/`1`/`2`/`3`.png" + }], + {"Mapnik", "Grayscale"} -> + "https://tiles.wmflabs.org/bw-mapnik/`1`/`2`/`3`.png", + {"Mapnik", "LabelFree"} -> + "https://tiles.wmflabs.org/osm-no-labels/`1`/`2`/`3`.png", + {"Stamen", "Toner"} -> + "http://a.tile.stamen.com/toner/`1`/`2`/`3`.png", + {"Stamen", "Watercolor"} -> + "http://a.tile.stamen.com/watercolor/`1`/`2`/`3`.png", + {"ThunderForest", "Landscape"} :> RandomChoice[{ + "http://a.tile.thunderforest.com/landscape/`1`/`2`/`3`.png", + "http://b.tile.thunderforest.com/landscape/`1`/`2`/`3`.png", + "http://c.tile.thunderforest.com/landscape/`1`/`2`/`3`.png" + }], + {"ThunderForest", "Outdoors"} :> RandomChoice[{ + "http://a.tile.thunderforest.com/outdoors/`1`/`2`/`3`.png", + "http://b.tile.thunderforest.com/outdoors/`1`/`2`/`3`.png", + "http://c.tile.thunderforest.com/outdoors/`1`/`2`/`3`.png" + }], + "Öpnvkarte" -> + "https://tileserver.memomaps.de/tilegen/`1`/`2`/`3`.png", + "OpenPtMap" -> "http://www.openptmap.org/tiles/`1`/`2`/`3`.png", + {"Carto", "Dark"} -> + "https://cartodb-basemaps-a.global.ssl.fastly.net/dark_all/`1`/`2`/\ +`3`.png", + {"Carto", "Light"} -> + "https://cartodb-basemaps-a.global.ssl.fastly.net/light_all//`1`/`\ +2`/`3`.png", + "OpenSeaMap" -> + "http://tiles.openseamap.org/seamark/`1`/`2`/`3`.png", + {"OpenRailwayMap", "Standard"} :> RandomChoice[{ + "http://a.tiles.openrailwaymap.org/standard/`1`/`2`/`3`.png", + "http://b.tiles.openrailwaymap.org/standard/`1`/`2`/`3`.png", + "http://c.tiles.openrailwaymap.org/standard/`1`/`2`/`3`.png" + }], + {"OpenRailwayMap", "MaxSpeed"} :> RandomChoice[{ + "http://a.tiles.openrailwaymap.org/maxspeed/`1`/`2`/`3`.png", + "http://b.tiles.openrailwaymap.org/maxspeed/`1`/`2`/`3`.png", + "http://c.tiles.openrailwaymap.org/maxspeed/`1`/`2`/`3`.png" + }], + {"OpenRailwayMap", "Signals"} :> RandomChoice[{ + "http://a.tiles.openrailwaymap.org/signals/`1`/`2`/`3`.png", + "http://b.tiles.openrailwaymap.org/signals/`1`/`2`/`3`.png", + "http://c.tiles.openrailwaymap.org/signals/`1`/`2`/`3`.png" + }] + |>; + + GeoService["Properties"] = Keys[GeoService]; diff --git a/Prototypes/PacletInfo.m b/Prototypes/PacletInfo.m index 71f2762..1938864 100644 --- a/Prototypes/PacletInfo.m +++ b/Prototypes/PacletInfo.m @@ -3,7 +3,7 @@ Description -> "A paclet for prototype functions", Creator -> "Arnoud Buzing", Publisher -> "Wolfram Research", - Version -> "0.2.5", + Version -> "0.2.6", MathematicaVersion -> "11.2+", Loading -> Automatic, Thumbnail -> "icons/icon.png", @@ -50,7 +50,7 @@ "Prototypes`$RoamingAppDataDirectory", "Prototypes`DockButton", "Prototypes`$DockButtons", "Prototypes`CreateDock", "Prototypes`CreateDockButton", "Prototypes`EntityPropertiesDataset", "Prototypes`WolframBeta", -"Prototypes`NotebookTranslate","Prototypes`FileTranslate", "Prototypes`TranslationCell" +"Prototypes`NotebookTranslate","Prototypes`FileTranslate", "Prototypes`TranslationCell","Prototypes`GeoService" }, Context -> {"Prototypes`"} } } diff --git a/Prototypes/Prototypes.wl b/Prototypes/Prototypes.wl index 3e20aa9..8fe822e 100644 --- a/Prototypes/Prototypes.wl +++ b/Prototypes/Prototypes.wl @@ -12,7 +12,7 @@ Module[ {files}, files = {"Build.wl", "Dataset.wl", "Files.wl", "Image.wl", "Language.wl", "Paclet.wl", "Resources.wl", "Search.wl", "String.wl", "Color.wl", - "Entities.wl", "WolframAlpha.wl", "Translation.wl"}; + "Entities.wl", "WolframAlpha.wl", "Translation.wl","GeoGraphics.wl"}; Map[ Get[ FileNameJoin[{DirectoryName[$InputFileName], #}] ] &, files ]; (* only load in a notebook session *) diff --git a/Prototypes/Usage.wl b/Prototypes/Usage.wl index c284a93..97de0eb 100644 --- a/Prototypes/Usage.wl +++ b/Prototypes/Usage.wl @@ -101,3 +101,5 @@ WolframBeta::usage = "WolframBeta[input] translates 'input' to English, then cal NotebookTranslate::usage = "NotebookTranslate[nb, lang] translates 'nb' to the specified language 'lang' using TextTranslation"; FileTranslate::usage = "FileTranslate[file,lang] translates 'file' to the specified langugage 'lang' using TextTranslation"; TranslationCell::usage = "TranslationCell[text,lang] prints a \"Text\" cell containing 'text' with an attached button which lets you toggle between English and language 'lang'"; +(* geographics *) +GeoService::usage = "GeoService[name] provides GeoServer 'name' for geographical functions. Use GeoService[\"Properties\"] for a list. Use with GeoServer option.";