在Mapbox中,使用setStyle时如何保存图层?

时间:2018-08-27 00:14:21

标签: mapbox mapbox-gl-js

我为此奋斗了很多。面临的挑战是,我可能会在一种样式上绘制几个不同的图层,然后调用 balance_dataframe = pd.read_csv("balance.csv", sep=",") balance_dataframe = balance_dataframe.reindex(np.random.permutation(balance_dataframe.index)) balance_dataframe = balance_dataframe[balance_dataframe["Class"] != "B"] data = preprocessFeatures(balance_dataframe) target = preprocessClasses(balance_dataframe) train_features = data.head(500) train_classes = target.head(500) test_features = data.tail(200) test_classes = target.tail(200) _ = train_model( learning_rate=0.0001, steps=100, batch_size=70, hidden_units=[10, 10], training_examples=train_features, training_targets=train_classes, validation_examples=test_features, validation_targets=test_classes) (例如,进入卫星视图),这会擦除我的所有图层。

1 个答案:

答案 0 :(得分:3)

我通过复制我关心的图层和源并重新应用来解决它

setStyle