I'm currently using the bindTooptip function on a layer to bind a label to it.

One of my layers, however, consists of 2 Polygons that are within the same feature, using the array format:

    [0.22, -0.26], [0.23, -0.25], [0.23, -0.26], [0.22, -0.26]
    [0.29, -0.273], [0.29, -0.26], [0.30, -0.26], [0.30, -0.27]

While I am able to automatically style both Polygons this way, adding a label will center it on the first one. I'm wondering if there's any way to bind a tooltip onto the 2nd one, or if I simply need to separate the polygons and make my own logic for them to be grouped as they currently are.


You're going to have to separate them. You only get one set of attributes for a multi-polygon feature, and you only get one label.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.