-
Notifications
You must be signed in to change notification settings - Fork 466
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add legend in feature #1082
Labels
Comments
You have to get the interaction associated with the controls (2 and 3) and set the tooltip feature with the one of the draw: // Add a tooltip
var tooltip = new ol.Overlay.Tooltip();
map.addOverlay(tooltip);
// Set drawing feature (interaction on control 2 and 3
[2,3].forEach(function(i) {
// Drawline interaction
var draw= editbar.getControls()[i].getInteraction()
// Set feature on drawstart
draw.on('drawstart', tooltip.setFeature.bind(tooltip));
// Remove feature on finish
draw.on(['change:active','drawend'], tooltip.removeFeature.bind(tooltip));
}) |
Is it possible to fix the measured value? instead of just a tooltip |
Use CSS: .ol-popup.tooltips.black {
transform: none !important;
bottom: 0;
} |
Does anyone know how I can fix the values on the screen? |
I don't intend to fix the popup, but rather a label with the distance fixed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I would like to know how I can add the distance and area measurement feature to the "LineString" and "Polygon" controls in the example "https://viglino.github.io/ol-ext/examples/bar/map.control.editionbar. html" I would like to set these values as caption and not tooltip. Thank you, sorry for anything but I'm new here.
The text was updated successfully, but these errors were encountered: