This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Gali Nelle
committed
Mar 26, 2020
1 parent
fd1f870
commit 4b9e1b7
Showing
21 changed files
with
2,027 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
#pragma once | ||
|
||
#ifndef GL_GLEXT_PROTOTYPES | ||
#define GL_GLEXT_PROTOTYPES | ||
#endif | ||
#include <GLFW/glfw3.h> | ||
|
||
#include <mbgl/platform/gl_functions.hpp> | ||
#include <mbgl/gl/uniform.hpp> | ||
#include <mbgl/util/mat4.hpp> | ||
#include <mbgl/util/convert.hpp> | ||
#include <mbgl/util/projection.hpp> | ||
#include <mbgl/util/geo.hpp> | ||
#include <mbgl/util/projection.hpp> | ||
#include <mbgl/style/style.hpp> | ||
#include <mapbox/cheap_ruler.hpp> | ||
#include <mapbox/geometry.hpp> | ||
|
||
#include <mbgl/style/layer.hpp> | ||
#include <mbgl/style/filter.hpp> | ||
#include <mbgl/style/property_value.hpp> | ||
#include <mbgl/style/expression/formatted.hpp> | ||
#include <mbgl/util/color.hpp> | ||
|
||
using namespace mbgl; | ||
using namespace mbgl::style; | ||
|
||
namespace mbgl { | ||
namespace style { | ||
|
||
class LocationComponentLayer : public Layer { | ||
public: | ||
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; | ||
|
||
// Paint properties | ||
static PropertyValue<float> getDefaultAccuracyRadius(); | ||
const PropertyValue<float> getAccuracyRadius() const; | ||
void setAccuracyRadius(const PropertyValue<float>&); | ||
|
||
static PropertyValue<Color> getDefaultAccuracyRadiusBorderColor(); | ||
const PropertyValue<Color> getAccuracyRadiusBorderColor() const; | ||
void setAccuracyRadiusBorderColor(const PropertyValue<Color>&); | ||
|
||
static PropertyValue<Color> getDefaultAccuracyRadiusColor(); | ||
const PropertyValue<Color> getAccuracyRadiusColor() const; | ||
void setAccuracyRadiusColor(const PropertyValue<Color>&); | ||
|
||
static PropertyValue<expression::Image> getDefaultTopImage(); | ||
const PropertyValue<expression::Image> getTopImage() const; | ||
void setTopImage(const PropertyValue<expression::Image>&); | ||
|
||
static PropertyValue<float> getDefaultTopImageSize(); | ||
const PropertyValue<float> getTopImageSize() const; | ||
void setTopImageSize(const PropertyValue<float>&); | ||
|
||
static PropertyValue<float> getDefaultBearing(); | ||
const PropertyValue<float> getBearing() const; | ||
void setBearing(const PropertyValue<float>&); | ||
|
||
static PropertyValue<expression::Image> getDefaultBearingImage(); | ||
const PropertyValue<expression::Image> getBearingImage() const; | ||
void setBearingImage(const PropertyValue<expression::Image>&); | ||
|
||
static PropertyValue<float> getDefaultBearingImageSize(); | ||
const PropertyValue<float> getBearingImageSize() const; | ||
void setBearingImageSize(const PropertyValue<float>&); | ||
|
||
static PropertyValue<Position> getDefaultLocation(); | ||
const PropertyValue<Position> getLocation() const; | ||
void setLocation(const PropertyValue<Position>&); | ||
void setCoordinate(const LatLng &crd); | ||
|
||
static PropertyValue<expression::Image> getDefaultShadowImage(); | ||
const PropertyValue<expression::Image> getShadowImage() const; | ||
void setShadowImage(const PropertyValue<expression::Image>&); | ||
|
||
static PropertyValue<float> getDefaultShadowImageSize(); | ||
const PropertyValue<float> getShadowImageSize() const; | ||
void setShadowImageSize(const PropertyValue<float>&); | ||
}; | ||
} // namespace style | ||
} // namespace mbgl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#pragma once | ||
|
||
#include <mbgl/layermanager/layer_factory.hpp> | ||
|
||
namespace mbgl { | ||
|
||
class LocationComponentLayerFactory : public LayerFactory { | ||
protected: | ||
const style::LayerTypeInfo* getTypeInfo() const noexcept final; | ||
std::unique_ptr<style::Layer> createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept final; | ||
std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final; | ||
}; | ||
|
||
} // namespace mbgl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.