Customer ID for a container

I think it would be very beneficial to define a user defined id for a container.
In my use case I want to implement a HERE map into my website. HERE is relating to a container id which is user defined.

To implement a HERE map the following code is used:
// initialize a map
var map = new H.Map(document.getElementById(‘’),…

where is referencing to the container which holds the map.

Currently elements does not allow to define a specific container id.

Cheers Thomas

I’m not 100% sure I follow what you’re trying to do here… are you building this in a custom component?

1 Like

I think a custom component would be a good way to achieve this, it allows you to write your own HTML so you can specify an ID directly, or use the one assigned to the node.

Click the following link to take a look at an example project where I implemented a HERE map in a custom component. It allows you to specify an API key, longitude and latitude in the component settings.

elementsapp://downloadDocument/wS5TxaQ1BhNh

Note: There were some JS includes required that I added to the head end template in page settings.

2 Likes

@dan: I just wanted to try the standard components… :wink:

@tpbradley: Hey Tom, thanks for pointing me in the right direction :slight_smile:

You guys are awesome :slight_smile: Works like a charm - thanks for this quick solution.

1 Like