MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Layer switching in Virtual Earth Apps

This is a discussion on Layer switching in Virtual Earth Apps within the Virtual Earth Blogs forums, part of the Blogs category; A common question from developers just getting started with the Virtual Earth platform is how to control turning multiple layers ...


Go Back   MapPoint Forums > Blogs > Virtual Earth Blogs

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



Click here to register

Reply

 

LinkBack (2) Thread Tools Display Modes
  2 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 09-21-2007
Senior Member
Blue Belt
 
Join Date: Sep 2007
Posts: 161
Layer switching in Virtual Earth Apps

A common question from developers just getting started with the Virtual Earth platform is how to control turning multiple layers on and off. I received this question again yesterday so I put together this simple app as an example. The sample starts by loading three layers from existing Collections. These layers can be just as easily loaded from GeoRSS feeds or created programmatically on the fly. Loading a layer in VE is this simple:

var l = new VEShapeLayer();*****
var veLayerSpec = new VEShapeSourceSpecification(VEDataType.VECollection , "89202C9BEAFA5F9!450", l);***********
map.ImportShapeLayerData(veLayerSpec, fnLayerLoaded);

Each layer loads asynchronously and fires the specified callback when it completes. fnLayerLoaded in this case. Your call back is passed the corresponding VEShapeLayer for you to do whatever post processing you want to. in my case I formatted an HTML list of the data and set a custom icon for each layer. The list control above the map is used to switch layers. for a reference of all of the layer operations checkout the VE interactive SDK.

image

Technorati tags: Virtual Earth, developer

Currently Threshold Apprentice by Black Francis is playing

Click here to view the article.

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
apps, layer, switching, virtual earth


LinkBacks (?)
LinkBack to this Thread: http://www.mapforums.com/layer-switching-virtual-earth-apps-6400.html

Posted By For Type Date
virtual-earth: Blogs, Photos, Videos and more on Technorati This thread Refback 09-22-2007 03:56 PM
Virtual Earth: Blogs, Photos, Videos and more on Technorati This thread Refback 09-22-2007 02:07 PM

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
Virtual Earth @ WPC VirtualEarth MSDN Blog Virtual Earth Blogs 0 09-15-2007 02:17 PM
Virtual Earth Survey VirtualEarth MSDN Blog Virtual Earth Blogs 0 09-15-2007 02:17 PM
weather.com Using Virtual Earth Eric Frost MapPoint Web Service and Virtual Earth 1 04-01-2007 07:39 AM
MSN Virtual Earth. Eric Frost News and Announcements 0 11-03-2006 11:27 AM
Virtual Earth 4 Eric Frost MapPoint Web Service and Virtual Earth 0 10-31-2006 10:17 PM


All times are GMT -5. The time now is 09:40 AM.


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

Ski Holiday Packages
Choose from a selection of ski holiday packages from the top travel brands. Holiday Hypermarket makes it easy to search and browse great value ski holidays.

Spain Weather
Check Spain Weather before you travel. We provide information on Spain including weather, flights and accommodation.

Italy Holiday
An Italy Holiday is full of interesting stuff for the casual tourist and even more for the educated visitor. Check out the latest great deals at dealchecker.co.uk.

Mauritius Holidays
Mauritis holidays are a sun drenched, sense tingling experience of a lifetime. You will find bargain deals on many holidays with us!

Canaries
Find out all about the Canaries when you check out the ulookubook.com travel guides. Not only can you get a great holiday deal but you can find out useful information about potential holiday destinations.

Price Comparisons
Search and compare millions of holidays, flights and hotels etc. At Travel.co.uk, price comparisons are easy.

Cheap Holidays to Sharm el Sheikh
Break away to Northern Africa. Find cheap holidays to Sharm el Sheikh 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