Community of VE/MapPoint Users and Developers
This is a discussion on Scale indication in may map within the MapPoint Web Service and Virtual Earth forums, part of the Map Forums category; Hi! Iīm programing in .Net 2.0 (C#) and MapPoint Web Service. I canīt found the property to show the Scale ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Scale indication in may map Iīm programing in .Net 2.0 (C#) and MapPoint Web Service. I canīt found the property to show the Scale in my map. Iīll try to explain better... I need to show the scale of the map I show like Virtual Earth and Google Maps do. That way the user can know the real size of what is seeing. Thanks Jon |
| |||
| Re: Scale indication in my map
Hi, Here is my auto-answer, specting will be useful to someone. MWS hasnīt got an Scale bar !!!!Ok, no matter, everything has a solution except what hasnīt. ![]() The MapImage returned by the "renderService.GetMap(mapSpec)" has 3 views of the returned map, viewByScale has the Scale value. Depending on the unit you use (Miles or Kilometers, the second in my case) the Scale value (50000 for example) means that 1Cm. of the returned map equals 50000 cm. of what is representing. Or what is the same: "1:50000". Assuming 96 dpi resolution (what is the most normal) 1cm = 37,795275591px (Itīs easy to find this value and the mile=px just search) Now you have to choose what you wanna do with this values, if you going to have a scale bar with constant width or you want a variable width ajusting to some values. What I do is this: maxbar = 200px = Maximun scale bar width. cmToPx = 37,795275591. Explained above. scale= 30738cm = the scale value returned getting the map with my app starts barToKm = (((maxbar /cmToPx )*scale)/100000) = how many km represents my bar with the maximun width. km=Truncate(batToKm) = I donīt want to show decimal values KmtoPx = (((km * 100000) / scale) * cmToPx) = How many pixels represents the truncated km value. Now I draw a bar with KmToPx width; and a label with km.toString(). Thatīs All Folks Sorry for my bad english, and so long post. Txejo. |
![]() |
| Tags |
| indication, map, scale |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Map Scale | colin_turner99 | MapPoint 2006/2009 Discussion | 5 | 07-26-2006 09:59 AM |
| map scale | Anonymous | MapPoint 2006/2009 Discussion | 0 | 04-01-2005 04:38 PM |
| Minimum Map Scale? | bryker | MapPoint 2006/2009 Discussion | 0 | 03-09-2004 04:21 PM |
| overview map scale | Anonymous | MapPoint 2006/2009 Discussion | 1 | 02-19-2004 10:42 AM |
| Map Scale | ElenaF | MapPoint 2006/2009 Discussion | 1 | 10-15-2003 03:04 PM |
Flights from Coventry
Holiday Hypermarket can help you to find great value holidays to suit you. Book great value flights from Coventry Airport. We provide key information about the airport too.
Luxury Holidays
Luxury holidays, family holidays, ski holidays, cruises. Whatever your holiday needs your personal Travel Counsellor can help.
Flight
When looking to jet set off, make sure you check out dealchecker.co.uk before you check in anywhere else. Bag a bargain flight from all major scheduled and charter airlines.
Sri Lanka Holidays
There are some outstanding deals on Sri Lanka holidays at theholidayplace.co.uk. Sri Lanka is renowned for it's exceptional beauty! Book a holiday today!
Greece
Greece covers a large area and as a result there is an abundance of things to do, see and taste. You can relax on a beach, visit ancient sites or make a trip to one of the islands like Corfu, Crete or Rhodes.
Compare Holidays
Compare holidays online where you can see all the amazing possibilities at Travel.co.uk
Holidays in Fuerteventura
Need a break? Go to the Canary Islands! Find information on holidays in Fuerteventura at On The Beach.