Is it possible to make an image grow beyond the size of the canvas?

The application of the image is simple: when I press the rotate button, I set the background image of the marker with the image below the button that it contained in a canvas. But I have a problem. I want the image of the vertical line (contained in the canvas) to occupy the entire map at the top. Doesn't it take up everything because it is limited by the size of the canvas? How do I get the image of the vertical line inside the canvas (which is bigger) to cover the entire map screen?

Thanks, greetings!

I take it this is a continuation of this idea?

Why not draw a line string on the map (as @SteveJG previously suggested) , after calculating the start / end coordinates of the line string based upon the angle of rotation and the centre point of the marker ? The line string can be as long as you like.

Hi Tim, how are you?

Sure, I do that about the canvas and imagesprite, but the size of the image contained in the canvas is limited by the size of the canvas.

For example, if the canvas is 50px high and the image is 100px high, the image that I am going to set to markup will be 50px high and not 100px as I want.

The idea is to use the first case that you tell me. I can try the second case too, although it doesn't convince me.

With much help from @SteveJG, for which I am most grateful, I have developed a working example, based upon what I suggested. Using a marker as the start point, a touch anywhere on the map will draw a linestring on that bearing. This could be further programmed with a list of coordinates. No need for a canvas. The example is not perfect, and will generate errors if there is not enough "room" on the maptile/s for the linestring to be drawn.

lineStringerFormula.aia (9.0 KB)

For others, this example generates a "Destination Point" and its co-ordinates beyond that which is clicked on the map

To answer this question:

Is it possible to make an image grow beyond the size of the canvas?

Unfortunately, it is not possible.

What you can do is place a canvas inside a centred vertical or horizontal arrangement, then set the canvas dimensions to numbers larger than your arrangement. This then gives an impression of image sprites being larger than the canvas (even though they are not!). However, this will probably not help you with what you are trying to achieve.

Hi Tim! I must admit you were right about drawing a line with the linestring. Something like that I was looking for! Based on what you happened to me, I'm going to try to get to what I want.

Any doubt I will surely return, I hope not! haha

I thank you very much for the help and for the time!

@TIMAI2 I am left with one more question about this: Is there a way to generate N linestring dynamically? Either with a button or with some other action? And if there are many linestring, could the application stop working?

I only know that I can create linestring from the block window and statically.

No reason why not. You need a starting lat/lon, a bearing and a distance to create the linestring. How will it be "dynamic" ?

I think I was expressing myself wrong. I give an example: For each click, I generate a new linestring component. It would be like creating for each click, an independent line on the map.

Next I upload an image. The green arrow indicates the sequence of the steps.

The idea is to generate the amount of linestring components that I want by clicking, but instead of doing it from the block screen, do it with the app running

OK, but you still need the starting lat/lon, bearing and distance for each linestring......

Done a bit of work:

with a bit of work on the mathematics you could come up with a formula for setting a line based upon the lat/lon of the map centre string and the zoom level of the map

No one can create LineString instances dynamically using Blocks. You can only produce a dynamic Marker (runtime Marker) on the Map component but not a LineString. Tim @TIMAI2 presents a very viable way to display many LineStrings on the Map using LineString components already placed. Place as many LineStrings as you will need on your Canvas; hide them (by setting LineString.Visible to false) and then make them visible when needed. His idea is your solution.

This is the LineString documentation. Unlike Markers, that can produce a runtime Marker; LineStrings are always design time.

Excellent, thank you very much for your time guys, you were very helpful!

Hi @TIMAI2 How are you?
Test your program. I only changed the position of the marker (I placed it in Buenos Aires, Argentina). I only drew the line once and fired an error. Then I made another tap to generate another line and it didn't let me go anymore. I guess the error occurs because both coordinates are negative. The coordinate of -36.69 ... is correct, but the other one is not.

You are probably correct. You will need to rework the blocks to handle two negative coordinates.

I must be honest with you. I would not know how to solve it. There are too many math accounts that I can't understand, a lot of code that surpasses me.

Besides that, what does that fixed value in R (6371e3) mean? I would love to make it work for the case that fails me, but I have a hard time understanding it.