Skip to content

Commit

Permalink
a commit
Browse files Browse the repository at this point in the history
SymbolixAU committed Mar 4, 2019
1 parent c649c42 commit 99210e4
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions inst/htmlwidgets/mapbox.js
Original file line number Diff line number Diff line change
@@ -77,14 +77,6 @@
}
});

function add_mapbox_layer( map_id, layer_json ) {
var map = window[ map_id + 'map'];
var js = JSON.parse( layer_json );
map.on('styledata', function() {
map.addLayer( js );
});
}

function add_mapbox_source( map_id, id, source_json ) {
var map = window[ map_id + 'map'];
var js = JSON.parse( source_json );
@@ -96,6 +88,17 @@ function add_mapbox_source( map_id, id, source_json ) {
});
}

function add_mapbox_layer( map_id, layer_json ) {
var map = window[ map_id + 'map'];
var js = JSON.parse( layer_json );
map.on('styledata', function() {
map.addLayer( js );
console.log( map.getLayer( 'contours' ) );
});

}


if (HTMLWidgets.shinyMode) {

Shiny.addCustomMessageHandler("mapboxmap-calls", function (data) {

0 comments on commit 99210e4

Please sign in to comment.