02-21-2011 08:39 AM
Hi Everyone,
I want to find the left,right,top, bottom latitude longitude from Map,
I have used the 6.0 API MapDimentions and MapField.
By using ,
mapDimentions.getbottom(); //it will give me the bottom coordinate. or like getleft,gettop....
but it would not change when i moved the map.
i need a box coordinate or lat lon(all four) and also it will change when map moved..
Thanks,
Solved! Go to Solution.
02-21-2011 09:08 AM
You use convertFieldToWorld and use the 4 corners of the screen (in pixels) to get the appropriate map lat/lon coordinates.
02-21-2011 09:34 AM
Hi,
No.i am not using that but i can try for that,
thanks
any other comments.
Actually i am just test the OS 6.0 MapDimention class and its getboundry Method..
02-21-2011 11:35 PM
Hi ,
getboundry return the
left
right
below
and
top
cordiantes but it was static..
i want to get the four corner or four side data in dynamic manner like if i am scrolling the map than that data will be change by approciate mapfield data..
02-21-2011 11:40 PM
Hi jprofitt,
How should i get the 4 corners lat lon using convertFieldToWorld?
can you give me some hint or comments?
Thanks..
02-22-2011 09:19 AM
Here's the first corner:
//Just creating a new Coordinates object, the values don't matter Coordinates topLeft = new Coordinates(0,0,Float.NaN); //The field point in pixels that you want to convert, this is where you put your four corners XYPoint coords = new XYPoint(0, 0);
convertFieldToWorld(coords, topLeft);
After this topLeft will have your latitude and longitude of the top left corner of your map. Hope this helps!
02-22-2011 10:19 AM
hi jprofitt
Thanks for the Help..
Can you know about the MapDimention and getboundrybox() in 6.0 ?
it will also give me a 4 side cordiante..
it will display just +- boundry of latititude..
eg. like -76.1234 to 76 1234
it will not change when i m move the map..
Thanks...
02-22-2011 10:24 AM
I've only used the MapField in 5.0 so unfortunately I'm not experienced with that object/method.
05-19-2011 06:10 AM