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

Adds Example of VectorSource with a Third Party Tileset #1449

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions example/src/components/ThirdPartyVectorTileSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,14 @@ import sheet from '../styles/sheet';
const styles = MapboxGL.StyleSheet.create({
line: {
lineCap: "round",
lineJoin: "rouncd",
lineJoin: "round",
lineOpacity: 0.6,
lineColor: "rgb(53, 175, 109)",
lineWidth: 2
},
});

const VECTOR_SOURCE_URL =
'https://d25uarhxywzl1j.cloudfront.net/v0.1/{z}/{x}/{y}.mvt';
const TILEJSON_URL = "https://s3.amazonaws.com/tgaw/tilejson.json";
Copy link
Author

@tylergaw tylergaw Dec 17, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if we'll want to leave this URL in place. That's an object in an S3 bucket that I own.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yea something we can do is just add a local tilejson file to the example app, so we can pull it off of the devices file system

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh sweet, didn't realize that could be a local file. I can update the example to use that instead. Also need to update my app to do the same.


// This example ported to React Native:
// https://www.mapbox.com/mapbox-gl-js/example/third-party/
Expand All @@ -32,10 +31,11 @@ class ThirdPartyVectorTileSource extends React.PureComponent {
<MapboxGL.MapView
zoomLevel={12}
centerCoordinate={[-87.622088, 41.878781]}
styleURL="mapbox://styles/mapbox/light-v9"
style={sheet.matchParent}>
<MapboxGL.VectorSource
id="customTileSourceExample"
url={VECTOR_SOURCE_URL}>
url={TILEJSON_URL}>
<MapboxGL.LineLayer
id="customTileSourceLine"
sourceLayerID="mapillary-sequences"
Expand Down