gunnargr / timemap

Automatically exported from code.google.com/p/timemap
MIT License
0 stars 0 forks source link

suggestion of new feature: item.bringToFront() #80

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Have 2 events excacty on the same place, but in different days
2. Use item.changeTheme(TimeMap.themes.red) in case someone click on the event 
(the color of the marker changes)

What is the expected output? What do you see instead?
If someone click on one of the events, the color changes.
If someone click on the other event, the color does not change.
This happens because the z-index of one of the markers is behind the other.

What version of the product are you using? On what operating system?
Version 1.6

Please provide any additional information below.

This is a suggestion for new feature: a method to change the z-index of one of 
the items (bring to front). For example item.bringToFront().

Original issue reported on code.google.com by rui.pcoe...@netcabo.pt on 13 Nov 2010 at 10:06

GoogleCodeExporter commented 9 years ago
I think this is too specific a use case to add to the library; I've tried to 
limit what goes in so as to keep the size of the library small, and I don't 
think this will come up much. Google maps doesn't have a great way of doing 
this in any case, but you could do it pretty easily like this:

TimeMapItem.prototype.bringToFront = function() {
  this.map.removeOverlay(this.placemark);
  this.map.addOverlay(this.placemark);
}

I think that's likely to be the only way to do it in any case.

Original comment by nick.rab...@gmail.com on 14 Nov 2010 at 4:20