Skip to content

Updated indoor map example based on user feedback #145

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

Closed
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ All of the following examples use **version 3.1** of the API
* [Extruded geo shapes](https://heremaps.github.io/maps-api-for-javascript-examples/extruded-objects/demo.html) - 3D extrusion of the geometric shapes
* [Finding the Nearest Marker](https://heremaps.github.io/maps-api-for-javascript-examples/finding-the-nearest-marker/demo.html) - Find a marker nearest to the click location
* [Image overlay](https://heremaps.github.io/maps-api-for-javascript-examples/image-overlay/demo.html) - Display an animated weather radar
* [Interactive Map Layer](https://heremaps.github.io/maps-api-for-javascript-examples/transit-mapsjs-iml/demo.html) - Visualize Data from Interactive Map Layer on Map
* [Interactive Map Layer](https://heremaps.github.io/maps-api-for-javascript-examples/transit-iml/demo.html) - Visualize Data from Interactive Map Layer on Map
* [Interleave vector and object layers](https://heremaps.github.io/maps-api-for-javascript-examples/interleave-layers/demo.html) - Display an object under the buildings
* [Map Objects Event Delegation](https://heremaps.github.io/maps-api-for-javascript-examples/map-objects-event-delegation/demo.html) - Use event delegation on map objects
* [Map Objects Events](https://heremaps.github.io/maps-api-for-javascript-examples/map-object-events-displayed/demo.html) - Handle events on various map objects
Expand Down
6 changes: 5 additions & 1 deletion indoor-map/demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ <h1>Show an Indoor Map</h1>
</p>

<p>
More information on the use of the HERE Indoor Maps API is available <a href="https://developer.here.com/documentation/maps/dev_guide/topics/venues.html" target="_blank">here</a>.
More information on the use of the HERE Indoor Maps API is available <a href="https://developer.here.com/documentation/maps/3.1.34.2/dev_guide/topics/indoor-maps.html" target="_blank">here</a>.
</p>

<p>
Expand All @@ -65,4 +65,8 @@ <h3>Code</h3>
</p>
<script type="text/javascript" src='demo.js'></script>
</body>

<p>
For complete descriptions of the parameteres shown in this example, see the <a href=https://developer.here.com/documentation/maps/3.1.37.1/api_reference/index.html target="_blank">API Reference</a>.
</p>
</html>
12 changes: 6 additions & 6 deletions indoor-map/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const indoorMapHrn = 'hrn:here:data::org651595200:indoormap-ed6d5667-cfe0-4748-b
// 22766 - Mall of Berlin
const venueId = '7348';

// The value of the drawing id varies as per the venue being loaded. Replace with appropriate value.
// Optional, the value of the drawing id varies as per the venue being loaded. Replace with appropriate value.
const drawingId = 'structure-7880';

// Set to false if base map is not needed to be displayed.
Expand All @@ -34,7 +34,10 @@ const labelTextPreferenceOverride = [
*
* @param {H.Map} map A HERE Map instance
*/
function addVenueToMap(map) {
function addVenueToMap(map, platform) {
// Indoor Maps provider interacts with a tile layer to visualize and control the Indoor Map
const venuesProvider = new H.venues.Provider();

// Get an instance of the Indoor Maps service using a valid apikey for Indoor Maps
const venuesService = platform.getVenuesService({ apikey: yourApikey, hrn: indoorMapHrn }, 2);

Expand Down Expand Up @@ -106,8 +109,5 @@ var behavior = new H.mapevents.Behavior(new H.mapevents.MapEvents(map));
// Step 4: create the default UI component, for displaying bubbles
var ui = H.ui.UI.createDefault(map, defaultLayers);

// Indoor Maps provider interacts with a tile layer to visualize and control the Indoor Map
const venuesProvider = new H.venues.Provider();

// Step 5: add the Indoor Map
addVenueToMap(map);
addVenueToMap(map, platform);
2 changes: 1 addition & 1 deletion meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
"published": true
},
{
"uid": "transit-mapsjs-iml",
"uid": "transit-iml",
"title": "Interactive Map Layer",
"shortDescription": "Visualize Data from Interactive Map Layer on Map.",
"published": true
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.