Skip to content

Measurement Tooltip #1529

Discussion options

You must be logged in to vote

Hi @dvazquez-lightbox,
there is no method to add own content to the tooltip but you can overwrite it like that:

map.on("pm:drawstart", ({ workingLayer, shape }) => {
    if(shape === 'Rectangle'){
      workingLayer.on("pm:change", () => {
          map.pm.Draw.Rectangle._hintMarker.getTooltip().setContent(JSON.stringify(workingLayer.pm.measurements));
      });
    }
});

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@dvazquez-lightbox
Comment options

@dvazquez-lightbox
Comment options

@Falke-Design
Comment options

@dvazquez-lightbox
Comment options

Answer selected by dvazquez-lightbox
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants