Created
October 21, 2015 19:34
-
-
Save brendancol/e5e5c4fcf8e10f523654 to your computer and use it in GitHub Desktop.
Bokeh JavaScript API Example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function initializeMap() { | |
var data, i, options, r, scatter, val, x, xaxis, y, yaxis; | |
r = new Bokeh.Random(123456789); | |
var esri_natgeo_map_service = 'http://server.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer/tile/{Z}/{Y}/{X}'; | |
var esri_imagery_label = 'http://server.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places/MapServer/tile/{Z}/{Y}/{X}'; | |
var osm_service = 'http://c.tile.openstreetmap.org/{Z}/{X}/{Y}.png'; | |
var bing_service = 'http://t0.tiles.virtualearth.net/tiles/a{Q}.jpeg?g=854&mkt=en-US&token=Anz84uRE1RULeLwuJ0qKu5amcu5rugRXy1vKc27wUaKVyIv1SVZrUjqaOfXJJoI0' | |
tile_data_source = { | |
type:"TileLayer", | |
source:"tile_data_source" | |
}; | |
data = { | |
}; | |
var xmin = -20037508.34; | |
var ymin = -20037508.34; | |
var xmax = 20037508.34; | |
var ymax = 20037508.34; | |
options = { | |
plot_width: 800, | |
plot_height: 800, | |
x_range: [0, 100], | |
y_range: [0, 100], | |
url: osm_service, | |
tile_source: "WMTSTileSource" | |
}; | |
Bokeh.$("#bkplot").bokeh("figure", { | |
options: options, | |
sources: { | |
tile_data_source:data, | |
}, | |
glyphs: [tile_data_source], | |
tools: ["Pan", "WheelZoom", "Resize", "Reset", "BoxZoom"] | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment