You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1-3
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,7 @@
2
2
3
3
This repository holds a series of JavaScript based examples using the **HERE Maps API for JavaScript**. More information about the API can be found on [developer.here.com](https://developer.here.com/javascript-apis/) under the JavaScript APIs section.
4
4
5
-
This set of self-contained, use-case based examples is designed to be cloned by developers for their own use.
6
-
7
-
> **Note:** In order to get the sample code to work, you **must** replace all instances of `window.app_id` and `window.app_code` within the code and use your own **HERE** credentials.
5
+
> **Note:** In order to get the sample code to work, you **must** replace all instances of `window.apikey` within the code and use your own **HERE** credentials.
8
6
9
7
> You can obtain a set of credentials from the [Plans Page](https://developer.here.com/plans) on developer.here.com.
<p>This example shows how to add a context menu for the map and map objects. Map has a default context items to show the click position, centring the map and creating a circle. Circles have their own context menu item to remove them.
25
+
</p>
26
+
<divid="map"></div>
27
+
<h3>Code</h3>
28
+
<p>In order to add context menu items, first you need to subscribe to contextmenu event. ContextMenuEvent has a special items property, where menu items are stored. Each menu item is an instance of H.util.ContextItem class.
29
+
</p>
30
+
<p>By default new menu items does not replace the previous ones, instead all items are collected and displayed together. However you can easily modify the items array to change this behaviour. </p>
31
+
<p>Context items can be visually separated from each other by using the H.util.ContextItem.SEPARATOR.
0 commit comments