Openlayers 3 FreeDraw like Leaflet.FreeDraw - leaflet

Somebody knows if OpenLayers 3 had the plugin for free draw on the map like Leaflet.Freedraw ?
Leaflet.FreeDraw
Thanks you

There are no need for a plugin. It's already integrated in the library itself with drawing component ol.interaction.Draw. You will see it has a freehandCondition option.
By default, you just need to go to the official Draw Features demo, choose to draw a "LineString" or a "Polygon" by maintaining Shift button while drawing and it should work.

Related

Adding drop-shadow to map layer

I'm a UI Designer, and my client will use mapbox for his website. I'm working on a custom style where I want to make the whole map white with a drop-shadow.
I know only basics for now, so there's my question. How can I add a drop-shadow for 'land' layer? I just want to know if it's possible and it would be awesome to know the solution.
Thanks,
Robert
If you're talking about a style based on Mapbox Streets, then no, it's not possible, because there is actually no "land" layer. Instead, there are ocean layers, and land is just the background.
In general, "drop shadows" aren't really something you can easily do in Mapbox GL, although there are ways to kind of fake it with properties such as fill-translate.

How do I disable the tiles happening in leaflet? I just want my image to show fit to window and zoom single image

Leaflet framework seems like perfect solution, however it is using tiles to zoom. I want to source a single file and have it fit to window and zoom based on image being much larger than container.
I cannot find anywhere to disable tile feature. If I did would it break zoom functionality?
Welcome to SO!
Sounds like you overlooked Leaflet Image Overlay.
There is also a tutorial, although you may not need the CRS.Simple part.

Vaadin leaflet combining markers

I have a V-Leaflet map.
Depending on what the backend "says" (where/how-many), there'll be marker(s) on this map.
When 2 or more of these markers are closely located and thus overlap,
i'll look to combine them into one marker that refers to them all.
The only way i can think of is the explicit way -- getting the Bounds (org.vaadin.addon.leaflet.shared.Bounds)
of the portion of the map in view and going from there
(calculate how close/apart now those markers are, group/ungroup them accordingly.)
Is there a built-in/quicker way of doing this?
Note: i'm not interested in the mathematical/clustering part of the problem.
checking just not to miss out -- dont wanna redo if this is coded.
TIA.
Sounds like you are looking for V-Leaflet Markercluster extension:
Server side api for Leaflet Markercluster extension
It wraps Leaflet.markercluster plugin:
Provides Beautiful Animated Marker Clustering functionality for Leaflet, a JS library for interactive maps.

Leaflet showing radius as drawing circle

I was asked to see if I could using leaflet draw a circle and as I'm drawing it show what the current expanding radius is. Either as a tooltip or write it to a page label. I noticed the circle option has a showRadius option but can you capture this value as your drawing the circle?
Kind of like the measure tool that uses the drawing plugin can show your distance as you move the mouse.
This way the user can see how big their circle is as they are drawing it.
Any ideas, examples, hints?
Leaflet.draw plugin does that.
Check out this demo
However, it shows radius only when you create a circle. Unfortunately, not when you edit it.

Sencha chart marker being cut by axis line

I am trying to do a line chart in Sencha charts 1.0, and it works well. However - the marker circle is being cut by the axis line. You can see it also in the Sencha charts official example (that uses images as markers...): http://dev.sencha.com/deploy/touch-charts-1.0.0/examples/Line/.
I found another example that uses Ext js 4 that the line chart markers are not being cut:
http://dev.sencha.com/deploy/ChartsDemo/examples/chart/Line.html.
I tried multiple things: tried to play with CSS, tried even swithcing the code of Ext.chart.series.Line to the one from Ext JS 4 but with no success. Does anyone know of an easy way of doing it? even a reference to a clue of how doing it?
thanks
It seems like someone else already experienced it before me.
Apparently, Ext.js 4 implements charts using SVG while Sencha Charts 1.0 does it using drawing on Canvas. If the source code was more readable - I could have understood where it uses layers and where should I ask the Chart Canvas to have less z-Index. However, it isn't, and a comfortable workaround is to define 5 px (depends on the radius of your marker points) gutter for each series:
getGutters:function(){
return[0,5];
},
Found the solution in this thread:
http://www.sencha.com/forum/showthread.php?202886-add-space-on-x-axis-in-graph