Skip to content

Conversation

etpinard
Copy link
Contributor

@chriddyp

This PR add support for mapbox style JSON input in layout.mapbox.style. For example,

d3.json(urlToMapboxStyleJSON, function(err, style) {
  Plotly.plot(Tabs.fresh(), [{
    type: 'scattermapbox',
  }], {
    mapbox: {
      style: style
    }
  });
});

@etpinard etpinard added this to the v1.16.0 milestone Jul 29, 2016
if(self.styleUrl !== styleUrl) {
self.styleUrl = styleUrl;
map.setStyle(styleUrl);
if(self.styleObj.id !== styleObj.id) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @plotly/frontend simply mutating a mapbox style JSON won't trigger an update. Mapbox style JSONs are assumed to be constant unless their id change.

@etpinard etpinard merged commit 641b231 into master Aug 3, 2016
@etpinard etpinard deleted the mapbox-style-json branch August 3, 2016 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature something new
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant