# Worldmap - collision of marker names in different layers

**URL:** https://discourse.nodered.org/t/worldmap-collision-of-marker-names-in-different-layers/43539
**Category:** Dashboard
**Created:** [2 April 2021 08:53 UTC](https://discourse.nodered.org/t/worldmap-collision-of-marker-names-in-different-layers/43539 "2021-04-02T08:53:53Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![rogerjames99](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rogerjames99/32/25201_2.png) [@rogerjames99](https://discourse.nodered.org/u/rogerjames99)
#### Post date: [2 April 2021 08:53 UTC](https://discourse.nodered.org/t/worldmap-collision-of-marker-names-in-different-layers/43539/1 "2021-04-02T08:53:53Z")

</div>

I was hoping that marker names only had to be unique in individual layers.But this is not the case. So how can I check for the existence of a existing marker name so I can modify the one I am about to add to something different. I may be missing something here, but I cannot see way to query for this, or to intercept map events and build my own index.

Any ideas anyone.

Roger

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [2 April 2021 09:29 UTC](https://discourse.nodered.org/t/worldmap-collision-of-marker-names-in-different-layers/43539/2 "2021-04-02T09:29:31Z")

</div>

Well you are sending the data so presumably you can create an index at the point you send the data to the map node

---

<div class="post-metadata">

### Author: ![meeki007](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/meeki007/32/12499_2.png) [@meeki007](https://discourse.nodered.org/u/meeki007)
#### Post date: [2 April 2021 10:31 UTC](https://discourse.nodered.org/t/worldmap-collision-of-marker-names-in-different-layers/43539/3 "2021-04-02T10:31:39Z")

</div>

When you click the map to add a marker it creates an event that you can then format and put into an array. Then save the array to file if you like. There is no easy way of doing this but I like the control.

@dceejay - worldmap can be tough to wrap your brain around at first. I think I'm going to make a howto and flow example for the above question this weekend. Sunday  
The issue is mine is all tied up in the dashboard. I need to make it only req worldmap to work.

@rogerjames99 - I've done what you are asking about but my flow is too dang big and solved a issue I had of adding cameras to my map without having to hand code it up for each camera as I add them.

Give me a few days and I'll create something more basic for all users.

![addtomap](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/4/44e053af404ad2a9d51353e488b14d12b9608f28.jpeg)

---

<div class="post-metadata">

### Author: ![rogerjames99](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rogerjames99/32/25201_2.png) [@rogerjames99](https://discourse.nodered.org/u/rogerjames99)
#### Post date: [2 April 2021 11:05 UTC](https://discourse.nodered.org/t/worldmap-collision-of-marker-names-in-different-layers/43539/4 "2021-04-02T11:05:58Z")

</div>

I am getting to old for this game! If I build the index in a global context then that will work. Doh!

---

<div class="post-metadata">

### Author: ![meeki007](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/meeki007/32/12499_2.png) [@meeki007](https://discourse.nodered.org/u/meeki007)
#### Post date: [2 April 2021 22:54 UTC](https://discourse.nodered.org/t/worldmap-collision-of-marker-names-in-different-layers/43539/5 "2021-04-02T22:54:23Z")

</div>

@rogerjames99 - this is prob way below your skill level but your questions and the struggle is see others having with the worldmap (i love) made we want to create this example so others can start playing with it.

> [@Worldmap - Working with Markers example](https://discourse.nodered.org/t/worldmap-working-with-markers-example/43576):
>
> What this example provides: Save markers you create on the map between deployments, restarts, page refreshes. Warns user if marker name is already used and does not overwrite marker. Outlines step by step how to add a marker with name, layer, icon, and icon colour. First import this flow [{"id":"150b582b.3e6d68","type":"tab","label":"worldmap-markers","disabled":false,"info":""},{"id":"f1e92b11.aa1ed","type":"worldmap","z":"150b582b.3e6d68","name":"","lat":"","lon":"","zoom":"","layer":"","c…

---

<div class="post-metadata">

### Author: ![rogerjames99](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rogerjames99/32/25201_2.png) [@rogerjames99](https://discourse.nodered.org/u/rogerjames99)
#### Post date: [3 April 2021 10:47 UTC](https://discourse.nodered.org/t/worldmap-collision-of-marker-names-in-different-layers/43539/6 "2021-04-03T10:47:08Z")

</div>

Great flow thanks.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [3 May 2021 10:47 UTC](https://discourse.nodered.org/t/worldmap-collision-of-marker-names-in-different-layers/43539/7 "2021-05-03T10:47:52Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
