Skip to main content

It's actually intented not to work anymore, apparently you cannot create 2 Control features and expect both events to work on them. Instead you need to create one and apply this to both layers. The support for this was removed in 2.7 as stated in the docs. There is a good example of how to do this with 2 different Vector Layers2 different Vector Layers. This took me days to realize. You just need a way in your popup to determine what layer you are on and act accordingly so it seems.

It's actually intented not to work anymore, apparently you cannot create 2 Control features and expect both events to work on them. Instead you need to create one and apply this to both layers. The support for this was removed in 2.7 as stated in the docs. There is a good example of how to do this with 2 different Vector Layers. This took me days to realize. You just need a way in your popup to determine what layer you are on and act accordingly so it seems.

It's actually intented not to work anymore, apparently you cannot create 2 Control features and expect both events to work on them. Instead you need to create one and apply this to both layers. The support for this was removed in 2.7 as stated in the docs. There is a good example of how to do this with 2 different Vector Layers. This took me days to realize. You just need a way in your popup to determine what layer you are on and act accordingly so it seems.

Source Link
Glenn Plas
  • 914
  • 5
  • 9

It's actually intented not to work anymore, apparently you cannot create 2 Control features and expect both events to work on them. Instead you need to create one and apply this to both layers. The support for this was removed in 2.7 as stated in the docs. There is a good example of how to do this with 2 different Vector Layers. This took me days to realize. You just need a way in your popup to determine what layer you are on and act accordingly so it seems.