Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
arnoudbuzing committed May 17, 2018
1 parent 1e2cadb commit 7ceb372
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 3 deletions.
80 changes: 80 additions & 0 deletions Prototypes/GeoGraphics.wl
Original file line number Diff line number Diff line change
@@ -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];
4 changes: 2 additions & 2 deletions Prototypes/PacletInfo.m
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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`"} }
}
Expand Down
2 changes: 1 addition & 1 deletion Prototypes/Prototypes.wl
Original file line number Diff line number Diff line change
Expand Up @@ -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 *)
Expand Down
2 changes: 2 additions & 0 deletions Prototypes/Usage.wl
Original file line number Diff line number Diff line change
Expand Up @@ -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.";

0 comments on commit 7ceb372

Please sign in to comment.