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
GeoJSON point clustering #5724
Merged
Merged
GeoJSON point clustering #5724
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
a9d365d
add supercluster dependency
mourner 1b02d25
prepare GeoJSONTile for Supercluster
mourner bc66976
prepare GeoJSONSource for accepting options
mourner 3319841
try removing mbgl::GeoJSON
mourner 94d1ed5
fix setGeoJSON types
mourner f9faa1e
add GeoJSONSource getURL
mourner 84a314c
add geojson to include path
mourner 0e8dbb0
add Supercluster index in GeoJSONSource
mourner 0d410f2
fix GeoJSONSource getZoomRange
mourner e074e37
bring back mbgl::GeoJSON header
mourner 1b69aa2
fix tidy warnings hopefully
mourner 265dc37
try test-suite with enabled cluster test
mourner bbf451d
fix formatting in clustering-related files
mourner File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Submodule .mason
updated
8 files
+0 −1 | .travis.yml | |
+23 −4 | README.md | |
+2 −0 | mason | |
+39 −58 | mason.sh | |
+12 −2 | scripts/libpng/1.6.20/script.sh | |
+15 −0 | scripts/supercluster/0.2.0/.travis.yml | |
+34 −0 | scripts/supercluster/0.2.0/script.sh | |
+14 −17 | test/cpp11_header_install.sh |
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
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 |
---|---|---|
@@ -1,22 +1,10 @@ | ||
#pragma once | ||
|
||
#include <memory> | ||
|
||
namespace mapbox { | ||
namespace geojsonvt { | ||
class GeoJSONVT; | ||
} // namespace geojsonvt | ||
} // namespace mapbox | ||
#include <mapbox/geojson.hpp> | ||
|
||
namespace mbgl { | ||
|
||
class GeoJSON { | ||
public: | ||
GeoJSON(std::unique_ptr<mapbox::geojsonvt::GeoJSONVT>); | ||
GeoJSON(GeoJSON&&); | ||
~GeoJSON(); | ||
|
||
std::unique_ptr<mapbox::geojsonvt::GeoJSONVT> impl; | ||
}; | ||
using GeoJSON = mapbox::geojson::geojson; | ||
using FeatureCollection = mapbox::geojson::feature_collection; | ||
|
||
} // 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since a GeoJSON source might not have a URL, let's make this
optional<std::string> getURL()
so that downstream code has to explicitly handle the non-present case. Conveys the intent better than a possibly-empty string.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently it's only called when
loaded
isfalse
, in which case there's always a URL, so the empty string code path is never taken actually. Although it's probably right to make it bulletproof.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case, the getter should assert that the URL isn’t empty.