Community of VE/MapPoint Users and Developers
This is a discussion on Change Virtual Earth Background Color within the Virtual Earth Blogs forums, part of the Blogs category; I recently got pinged about how to change the background color of the DIV element for a Virtual Earth map. ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Change Virtual Earth Background Color I recently got pinged about how to change the background color of the DIV element for a Virtual Earth map. Virtual Earth's CSS elements aren't documented (at least not officially), so perhaps this helps those who need/want this changed. So, the typical scenario for loading a map is to call LoadMap() and by zooming all the way out you can see the map control's tan color behind the tiles (#E9E7D4). The following code will render your basic Virtual Earth map. We'll use this to illustrate the necessary changes to make in order to modify the background color. The specific request came up because Virtual Earth doesn't "wrap around." Meaning, if you pan east or west you can't get back to where you started. You hit an edge (the end of the map control tiles) and have to go back the opposite direction. Certainly not ideal, so, if you have an application with points that span both the eastern and western half of the Pacific Ocean you may end up seeing the map zoomed out completely. Well, the tan doesn't look so great, so we can change the color to match the oceans - #B3C6D4. So pretty! Eh-hem. Ah, so, what are the code changes? You'll want to use onLoadMap property so when the map loads the color will be there and you'll want to attach an onchangeview event to the map control so the color remains the same when the map view changes. Differences from the above code are highlighted in red below. I simply had to override the CSS for the DIV element. You can also attach other events like onchangemapstyle for when users switch to aerial view to change the background to the cool dark blue (#020514) or any RGB color. CP Click here to view the article. |
![]() |
| ||||
| Posted By | For | Type | Date | |
| The Magazine for MapPoint - MP2K Magazine | This thread | Refback | 07-10-2008 02:45 PM | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Change color of arrow | Shragel | MapPoint 2006/2009 Discussion | 3 | 07-12-2006 07:28 PM |
| Change Background Color of Map | wadams | MapPoint 2006/2009 Discussion | 3 | 06-05-2006 09:34 AM |
| Change color of Text Balloon | Anonymous | MapPoint 2006/2009 Discussion | 2 | 05-17-2004 07:26 AM |
| Can one say me how to change color of DataMap to white!! | Anonymous | MapPoint 2006/2009 Discussion | 0 | 04-09-2003 10:15 AM |
| Can I change the color of the over-all map? We wa.... | Anonymous | MapPoint 2006/2009 Discussion | 1 | 08-29-2000 12:56 PM |
Ski Holidays Austria
Ski holidays in Austria offer ski schools for all types of skiers. They range from beginner classes of all ages to more advanced classes. Learn new techniques and refresh skills.
European City Breaks
Book European city breaks with Travel Counsellors. A personal travel counselor will help plan your European city break.
Cheap Holidays to Cuba
Cheap holidays to Cuba are a reality when you book with dealchecker.co.uk. We search leading UK Travel agents and tour operators to bring you some great deals.
Dominican Republic Holidays
Dominican Republic holidays have something to offer for everyone. From water sports, to sun bathing and more, enjoy a holiday there!
Spain
Spain is such a diverse country that it has something to offer most holidaymakers. Finding delicious cuisine is no challenge and the shopping ranges from designer boutiques to unknown flea markets. Spain has much to offer.
Travel
Check out the travel options on Travel.co.uk.
Cheap Gran Canaria Holidays
Want to take a break and visit the Canary Islands? Get information on cheap Gran Canaria holidays at On The Beach.