Make grouped object draggable

The draggable property is great for showing a map, but I'm having a slight problem with it.

Until I had only a map as a single layer (a large map exceeding the borders of the mobile screen) and made it draggable it played beautifully as a map which can be panned on the screen.

Now, I'd like to add some pinpoints on the map as separate layers/assets. In order to have the pins remaining at the same place, I have to group the items with the map. The desired behavior would be to make then the whole group draggable, therefore if I drag the map, move the pins with it as well, the pins remaining at the same place on the map. However, it seems that making a group draggable makes the individual layers under it draggable instead of treating the whole group as one draggable item.

As a result, the map becomes draggable (with the pins remaining at the same place) and the pins become individually draggable - obviously, this is not the desired behavior.

Is there anything I'm missing, or if I'm right, any good advice for workaround?


Please sign in to leave a comment.