Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
double fixup?
Browse files Browse the repository at this point in the history
  • Loading branch information
Gali Nelle committed Mar 26, 2020
1 parent 5a9f47d commit c11f652
Show file tree
Hide file tree
Showing 8 changed files with 819 additions and 108 deletions.
113 changes: 96 additions & 17 deletions include/mbgl/gl/location_component_layer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <mbgl/style/property_value.hpp>
#include <mbgl/style/expression/formatted.hpp>
#include <mbgl/util/color.hpp>
#include <array>

using namespace mbgl;
using namespace mbgl::style;
Expand All @@ -33,23 +34,7 @@ class LocationComponentLayer : public Layer {
LocationComponentLayer(const std::string& id);
~LocationComponentLayer() final;

// Dynamic properties
optional<conversion::Error> setPropertyInternal(const std::string& name,
const conversion::Convertible& value) final;
StyleProperty getProperty(const std::string&) const final;

class Impl;
const Impl& impl() const;

Mutable<Impl> mutableImpl() const;
LocationComponentLayer(Immutable<Impl>);
std::unique_ptr<Layer> cloneRef(const std::string& id) const final;

LocationComponentLayer(const LocationComponentLayer&) = delete;

Value serialize() const final;
Mutable<Layer::Impl> mutableBaseImpl() const final;

#if 0
// Paint properties
static PropertyValue<float> getDefaultAccuracyRadius();
const PropertyValue<float> getAccuracyRadius() const;
Expand Down Expand Up @@ -95,6 +80,100 @@ class LocationComponentLayer : public Layer {
static PropertyValue<float> getDefaultShadowImageSize();
const PropertyValue<float> getShadowImageSize() const;
void setShadowImageSize(const PropertyValue<float>&);
#else
// Layout properties

static PropertyValue<expression::Image> getDefaultBearingImage();
const PropertyValue<expression::Image>& getBearingImage() const;
void setBearingImage(const PropertyValue<expression::Image>&);

static PropertyValue<expression::Image> getDefaultShadowImage();
const PropertyValue<expression::Image>& getShadowImage() const;
void setShadowImage(const PropertyValue<expression::Image>&);

static PropertyValue<expression::Image> getDefaultTopImage();
const PropertyValue<expression::Image>& getTopImage() const;
void setTopImage(const PropertyValue<expression::Image>&);

// Paint properties

static PropertyValue<float> getDefaultAccuracyRadius();
const PropertyValue<float>& getAccuracyRadius() const;
void setAccuracyRadius(const PropertyValue<float>&);
void setAccuracyRadiusTransition(const TransitionOptions&);
TransitionOptions getAccuracyRadiusTransition() const;

static PropertyValue<Color> getDefaultAccuracyRadiusBorderColor();
const PropertyValue<Color>& getAccuracyRadiusBorderColor() const;
void setAccuracyRadiusBorderColor(const PropertyValue<Color>&);
void setAccuracyRadiusBorderColorTransition(const TransitionOptions&);
TransitionOptions getAccuracyRadiusBorderColorTransition() const;

static PropertyValue<Color> getDefaultAccuracyRadiusColor();
const PropertyValue<Color>& getAccuracyRadiusColor() const;
void setAccuracyRadiusColor(const PropertyValue<Color>&);
void setAccuracyRadiusColorTransition(const TransitionOptions&);
TransitionOptions getAccuracyRadiusColorTransition() const;

static PropertyValue<float> getDefaultBearing();
const PropertyValue<float>& getBearing() const;
void setBearing(const PropertyValue<float>&);
void setBearingTransition(const TransitionOptions&);
TransitionOptions getBearingTransition() const;

static PropertyValue<float> getDefaultBearingImageSize();
const PropertyValue<float>& getBearingImageSize() const;
void setBearingImageSize(const PropertyValue<float>&);
void setBearingImageSizeTransition(const TransitionOptions&);
TransitionOptions getBearingImageSizeTransition() const;

static PropertyValue<float> getDefaultImageTiltDisplacement();
const PropertyValue<float>& getImageTiltDisplacement() const;
void setImageTiltDisplacement(const PropertyValue<float>&);
void setImageTiltDisplacementTransition(const TransitionOptions&);
TransitionOptions getImageTiltDisplacementTransition() const;

static PropertyValue<std::array<double, 3>> getDefaultLocation();
const PropertyValue<std::array<double, 3>>& getLocation() const;
void setLocation(const PropertyValue<std::array<double, 3>>&);
void setCoordinate(const LatLng &crd);
void setLocationTransition(const TransitionOptions&);
TransitionOptions getLocationTransition() const;

static PropertyValue<float> getDefaultPerspectiveCompensation();
const PropertyValue<float>& getPerspectiveCompensation() const;
void setPerspectiveCompensation(const PropertyValue<float>&);
void setPerspectiveCompensationTransition(const TransitionOptions&);
TransitionOptions getPerspectiveCompensationTransition() const;

static PropertyValue<float> getDefaultShadowImageSize();
const PropertyValue<float>& getShadowImageSize() const;
void setShadowImageSize(const PropertyValue<float>&);
void setShadowImageSizeTransition(const TransitionOptions&);
TransitionOptions getShadowImageSizeTransition() const;

static PropertyValue<float> getDefaultTopImageSize();
const PropertyValue<float>& getTopImageSize() const;
void setTopImageSize(const PropertyValue<float>&);
void setTopImageSizeTransition(const TransitionOptions&);
TransitionOptions getTopImageSizeTransition() const;
#endif

// Private implementation
class Impl;
const Impl& impl() const;

Mutable<Impl> mutableImpl() const;
LocationComponentLayer(Immutable<Impl>);
std::unique_ptr<Layer> cloneRef(const std::string& id) const final;

// Dynamic properties
optional<conversion::Error> setPropertyInternal(const std::string& name, const conversion::Convertible& value) final;

StyleProperty getProperty(const std::string& name) const final;
Value serialize() const final;

Mutable<Layer::Impl> mutableBaseImpl() const final;
};
} // namespace style
} // namespace mbgl
8 changes: 2 additions & 6 deletions scripts/style-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ referenceSpec["paint_location-component"] = {
"transition": false,
"expression": {
"interpolated": false,
"parameters": [
"zoom"
]
"parameters": [ ]
}
},
"location": {
Expand All @@ -60,9 +58,7 @@ referenceSpec["paint_location-component"] = {
"transition": false,
"expression": {
"interpolated": false,
"parameters": [
"zoom"
]
"parameters": []
}
},
"accuracy-radius": {
Expand Down
Loading

0 comments on commit c11f652

Please sign in to comment.