0
votes

I have an application that is using bing maps.

I can get the boundary of the current show map - for example, if my map is on Canada, then I will get the boundary of Canada (A rectangle):

 LocationRect bounds = map.Bounds;

bounds has - Height, Width, East(point of type double), West, North, South, Center.

How can I get the bounds * 2? (In math I think it's Area * 2).

Explanation:

I have the bounds of the map (A rectangle). I want to enlarge this bounds to be bigger twice.

If my rectangle was 2cm, 5cm -> it will become 4cm, 10cm.

1
I don't understand what you're trying to obtain. Can you please explain it a little bit better?psousa
I have added an explanation to the first postMisha Zaslavsky

1 Answers

1
votes

Scheme

If I understand it right it is a simple question if not... :-)

You have a Black rectangle that you know the ABCD coordinates.

Calculate the distance between AD Which will be your Y and the distance between AB that will be your X.

In order to get get the EFHG coordinates of a new rectangle that you need to follow the sketch, just add or subtract from vertexes coordinates of the Black rectangle in order to get the Blue rectangle.

Of course, you need to check all the time that the coordinates of the blue rectangle do not exceed the maximum coordinates of the map.