Azure Maps - How to increase the max text size/avoid word wrap? [closed] - azure-maps

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
When I create a symbol layer the text field is wrapped if the text becomes too long. I'm not able to figure out why/when the text is to long. It seems to depend on different things e.g. font type, text size and text length.
I tested the text length by using this example code. I replace Cafeteria with the alphabet with space between each character. It then wraps to a second line between m and n and that's to few letters on one line for our use case. https://azuremapscodesamples.azurewebsites.net/Symbol%20Layer/Formatted%20text%20field.html
I have been working with mapbox. They have a setting "text-max-width" that solves this issue.
I have checked the javascript code that comes with the npm package azure-maps-control and it doesn't implement support for "text-max-width".
Do anyone know how to fix the wrapping issue or if the package azure-maps-control are going to implement support for the "text-max-width" setting?

There is no option for this today, but I've added it to the feature request list. As a work around, you could do the following:
var layer = new atlas.layer.SymbolLayer(datasource);
map.map.setPaintProperty(layer.getId(), 'text-max-width', 15);

Related

How can I write an array of arraylist in the uml? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
This is my array of arraylist: Arraylist[] a = new Arraylist[SIZE];
I’m struggling with writing it in my UML diagram, how can I write it?
With or without the <>?
The simplest way is to define it this way:
a is of type Arraylist (after the colon) with multiplicity 0..* and its default (after the equal sign) is Arraylist[SIZE].
As commented by #bruno the default value is a bit of interpretation. UML basically should be held language agnostic, but sometimes you just want to point out implementation details (for whatever reason). So you can add the new keyword right in front of the Arraylist[SIZE]. What that actually means is language dependent (and so out of a general scope I like to stick to).

Model 3D spring from points [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I have generated points like this and now I what to connect all these points into one model - spring. How can I achieve this? I've tried iterating through each point and build it from polygons or triangles but I have failed.
I have set of rings where each ring was build from points which coords I have.
You probably want to treat these as generalized cylinders and tessellate a triangle mesh. This can be done by sweeping a circle along the path. Some of the details are tricky since undefined tangents can lead to unexpected twists in your triangle mesh. You might want to study the GLE library or the TubeGeometry implementation in ThreeJS.
For simplestic rendering, note that OpenGL has GL_LINE_STRIP. It also has glLineWidth, although many platforms have a max width of 1. You would need to take care to use separate draw calls for seperate springs, otherwise they'll be connected.

how to load a stack of images on matlab [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I have 170 png images in a folder.
I want to load and store them in a matrix/array/cell array, so that i can easily access and modify them but I'm stuck at the very beginning.
How can I do it? Which is the best structure?
Assuming they are all the same size, in the folder containing the images:
list=dir('*.png'); % read all the .pngs in your folder
Image1=imread(list(1).name); % read the first image to calculate the dimentions of your stack
ImSize=size(Image1)
ImageStack=zeros(ImSize(1),ImSize(2),length(list)); % preallocate your stack with zeros
for ii=1:length(list)
Image=imread(list(ii).name
ImageStack(:,:,ii)=rgb2gray(Image); % copy an image in each step of the third dimsion of your stack
end
If you need the color information just add another dimension to ImageStack and forget the rgb2gray(). Hope that helps!

Accessing multidimensional arrays without using loop? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
Hi friends I was working on a project where we need to use quite a few multidimensional arrays. I am using for loops to access different array elements, then I just thought what if I don’t have a liberty to use looping? How am I going to access array element?
I am new to C, so thought of discussing here, I am sure there might be thousans of people who could have thought the same way, and hopefully found the solution.
Below example of multidimensional array is give, please guide me.
Thanks
static int t[3][2][4] = { {2,4,3,6,
1,6,7,9,},
{8,2,1,1,
2,3,7,3,},
{1,6,2,4,
0,7,9,5,},
};
Please Help me...thanks!
If you need to go through all of the values inside the loop without manual handling (i.e. x = t[1][1][1] then x = t[1][1][2] etc) then you want to use loops, enhanced loops or iterators. However since you're using C the only of those three options available are standard loops, which you're trying not to use. So... there's mo straight forward way to do that really.
If you're willing to use some other C libraries however then there may be more options for you. Iterator libraries probably exist.
A non-straightforward way to do it (if you're looking for one) could be through recursion, however that's really quite wasteful. I advise you just use loops :P
What are you trying to prove with loops and without loops should be first thought.
If u want to access all the elements and not use loop is like writing a lot of code manually and waste of memory(in your case 3 * 2 * 4 no of lines instead of few ).
Instead of showing the array if you had put in your code how and where you accessing elements it would have been more clear to tell what you wanted .

Camera calibration across multiple images [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
Taking one camera and moving it around to take two images of the same object, from a different viewpoint, one should be able to compute a matrix that relates these two scenes. In OpenCV, how is this accomplished?
If said object is a calibration pattern like the chessboard used by OpenCV, then the camera calibration routine mentioned by ChrisO would give you both the camera intrinsics (focal length, principal point, and lens distortion) as well as the camera extrinsics (where they are relatively in space).
If you have general object, then you need to establish a set of 2D correspondences which you can feed into cvFindFundamentalMat. This finds the fundamental matrix which relates the two perspectives. Namely, for each point x in camera 1 and corresponding point x' in camera 2, x'Fx = 0. You can similarly find the epipoles, etc. This uses the 8 point algorithm which requires at least 8 point pairs of point correspondences.
You can get the correspondences either manually or with a robust feature extractor and matcher along the lines of MSER/Affine Harris + SIFT.

Resources