1 #include <mbgl/style/conversion/position.hpp> 2 #include <mbgl/style/conversion/constant.hpp> 3 4 #include <array> 5 6 namespace mbgl { 7 namespace style { 8 namespace conversion { 9 operator ()(const Convertible & value,Error & error) const10optional<Position> Converter<Position>::operator()(const Convertible& value, Error& error) const { 11 optional<std::array<float, 3>> spherical = convert<std::array<float, 3>>(value, error); 12 13 if (!spherical) { 14 return {}; 15 } 16 17 return Position(*spherical); 18 } 19 20 } // namespace conversion 21 } // namespace style 22 } // namespace mbgl 23