Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properties values should not be limited to String #430

Open
zdila opened this issue Feb 20, 2025 · 3 comments
Open

Properties values should not be limited to String #430

zdila opened this issue Feb 20, 2025 · 3 comments

Comments

@zdila
Copy link

zdila commented Feb 20, 2025

Property value in MVT can be also number or bool.

@codeart1st
Copy link
Owner

I get your point. To simplify things, this library currently exports every value in its string representation.

mvt-reader/src/lib.rs

Lines 245 to 268 in c4dfe27

fn get_string_value(value: vector_tile::tile::Value) -> String {
if value.string_value.is_some() {
return value.string_value.unwrap();
}
if value.float_value.is_some() {
return value.float_value.unwrap().to_string();
}
if value.double_value.is_some() {
return value.double_value.unwrap().to_string();
}
if value.int_value.is_some() {
return value.int_value.unwrap().to_string();
}
if value.uint_value.is_some() {
return value.uint_value.unwrap().to_string();
}
if value.sint_value.is_some() {
return value.sint_value.unwrap().to_string();
}
if value.bool_value.is_some() {
return value.bool_value.unwrap().to_string();
}
String::new()
}

codeart1st added a commit that referenced this issue Feb 22, 2025
codeart1st added a commit that referenced this issue Feb 22, 2025
github-actions bot pushed a commit that referenced this issue Feb 22, 2025
# [1.8.0-alpha.1](v1.7.0...v1.8.0-alpha.1) (2025-02-22)

### Features

* keep value types ([60f9d95](60f9d95)), closes [#430](#430)
Copy link

🎉 This issue has been resolved in version 1.8.0-alpha.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@codeart1st
Copy link
Owner

Does this suit your needs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants