Skip to content
This repository has been archived by the owner on Mar 8, 2023. It is now read-only.

Commit

Permalink
HARP-11210: Fix typo in the HERE vector tile example.
Browse files Browse the repository at this point in the history
The example was referencing the symbol `mapView` instead of `map`
when installing the copyright info handler.

Signed-off-by: Roberto Raggi <roberto.raggi@here.com>
  • Loading branch information
robertoraggi committed Jul 13, 2020
1 parent a23db76 commit cebb53a
Showing 1 changed file with 22 additions and 18 deletions.
40 changes: 22 additions & 18 deletions @here/harp-examples/src/datasource_here_vector_tile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export namespace DatasourceHEREVectorTileExample {

// snippet:harp_gl_datasource_here_vector_tile_example_2.ts

CopyrightElementHandler.install("copyrightNotice", mapView);
CopyrightElementHandler.install("copyrightNotice", map);

const mapControls = new MapControls(map);
mapControls.maxTiltAngle = 50;
Expand All @@ -93,23 +93,27 @@ export namespace DatasourceHEREVectorTileExample {
return map;
}

const mapView = initializeMapView("mapCanvas");
function main() {
const mapView = initializeMapView("mapCanvas");

// snippet:harp_gl_datasource_here_vector_tile_example_4.ts
const omvDataSource = new OmvDataSource({
baseUrl: "https://vector.hereapi.com/v2/vectortiles/base/mc",
apiFormat: APIFormat.XYZOMV,
styleSetName: "tilezen",
authenticationCode: apikey,
authenticationMethod: {
method: AuthenticationMethod.QueryString,
name: "apikey"
},
copyrightInfo
});
// end:harp_gl_datasource_here_vector_tile_example_4.ts
// snippet:harp_gl_datasource_here_vector_tile_example_4.ts
const omvDataSource = new OmvDataSource({
baseUrl: "https://vector.hereapi.com/v2/vectortiles/base/mc",
apiFormat: APIFormat.XYZOMV,
styleSetName: "tilezen",
authenticationCode: apikey,
authenticationMethod: {
method: AuthenticationMethod.QueryString,
name: "apikey"
},
copyrightInfo
});
// end:harp_gl_datasource_here_vector_tile_example_4.ts

// snippet:harp_gl_datasource_here_vector_tile_example_5.ts
mapView.addDataSource(omvDataSource);
// end:harp_gl_datasource_here_vector_tile_example_5.ts
}

// snippet:harp_gl_datasource_here_vector_tile_example_5.ts
mapView.addDataSource(omvDataSource);
// end:harp_gl_datasource_here_vector_tile_example_5.ts
main();
}

0 comments on commit cebb53a

Please sign in to comment.