[core] Adjust layer source properties to better reflect reality

* Layer source ID is immutable; must be provided to the constructor
* Layer source layer is mutable
* Layers with GeoJSON sources do not have a source layer

While here, make Layer::copy impl-private.
This commit is contained in:
John Firebaugh
2016-06-22 12:31:49 -07:00
parent 089c4e413f
commit c4e4cc5081
24 changed files with 176 additions and 182 deletions

View File

@@ -38,13 +38,5 @@ void Layer::setMaxZoom(float maxZoom) const {
baseImpl->maxZoom = maxZoom;
}
std::unique_ptr<Layer> Layer::copy(const std::string& id,
const std::string& ref) const {
std::unique_ptr<Layer> result = baseImpl->clone();
result->baseImpl->id = id;
result->baseImpl->ref = ref;
return result;
}
} // namespace style
} // namespace mbgl