Hi,
I would like to check if there are any means that would allow me to draw lines on the tile layer? I was looking at this example
http://docs.telerik.com/kendo-ui/controls/diagrams-and-maps/map/how-to/link-marker-to-location and would need lines to be drawn on top of the tile layer instead of them being drawn over the shape layer.
Best Regards,
CH
5 Answers, 1 is accepted
The tile layer is only able to load images. You'll need to overlay with a shape layer to enable free-form drawing.
I hope this helps.
Regards,
T. Tsonev
Telerik
Hi Tsonev,
I was modifying the script from the link-marker-to-location example by adding a tile layer but noted that the tile layer will always appear over the shape layer, thereby obscuring the drawn line. Is there any example whereby shape layer will appear over the tile layer so that the drawn line will appear on the top most layer? I do not need geojson data on the shape layer.
Best Regards,
CH
Please accept my apologies for the delayed response.
The layers will render in the order they're defined. If you put the tile layer first it should remain below the shape layer.
You can also specify a zIndex - useful when you're adding layers dynamically for example.
I hope this helps.
Regards,
T. Tsonev
Telerik
I am facing the same issue. In my code the order of layer is Tile, Shape and Markers. Is that correct order?
Regards,
Bhumi
Hi, Bhumi,
Yes, that would be the correct order. Could you share an example in dojo where the problem is reproduced so I can examine it locally?
I have updated sample code https://dojo.telerik.com/oyilErAR. I want to display arrow on the path end where marker move to next marker.
Regards,
Bhumi
Hi, Bhumi,
There is no built-in shape for an arrow, basically you'll have to draw it on your own using the Canvas and lines.
Here is one example using the provided dojo:
Hi Tsonev,
Thanks for the solution. One question on map.locationToView. I have got a function that is supposed to retrieve the view coordinates whenever a user clicks on the marker. However, I noticed that the return value remains the same after I pan or zoom the map. How would I be able to get the correct pixel coordinates from this function?
Best Regards,
Choong How
I'll investigate and back to you on the locationToView method. It looks like a bug to me - it should take into account the scroll offset.
How about using the eventToView method directly? It will extract coordinates from the browser event directly.
Regards,
T. Tsonev
Telerik