MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Scale indication in may map

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 ...


Go Back   MapPoint Forums > Map Forums > MapPoint Web Service and Virtual Earth

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-19-2007
Junior Member
White Belt
 
Join Date: Aug 2007
Posts: 2
Scale indication in may map

Hi!

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 09-28-2007
Junior Member
White Belt
 
Join Date: Aug 2007
Posts: 2
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
indication, map, scale


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

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


All times are GMT -5. The time now is 08:37 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map

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.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52