Question

Using visual web developer express 2010, I want to display a shape file and be able to manipulate the colors of the regions specified by that shape file based on some data values.

I found some code (I think it was an MSDN page) that throws up a simple map on to the screen of a web page. Here it is:

 <script type="text/javascript" src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.3"></script>

  <script type="text/javascript">
      var map;

      function OnPageLoad() {
          map = new VEMap('myMap');
          map.LoadMap();

      }
  </script>

<body onload="OnPageLoad();">
  <div id="myMap" style="position:relative;width:640px;height:480px;"></div>

It doesn't use a shapefile, per se, but something online that it's pointing to (Virtual Earth). that's okay, that might work, but ...

It displays a map with some basic control mechanisms (pan, zoom, etc.). I copy-pasted this into a web page and it works well. I want to be able to color regions on this map based on some values. I figure there's got to be some kind of underlying structure to this thing (an object model) that contains references to the regions, etc. But I can get any help from intellisense in visual web developer express 2010.

Anyone have an idea how to do this?

Meanwhile, back to searching the web.

Was it helpful?

Solution

In 6.3 I believe you do this with the VEShape Class.

Here are the classes supported for 6.3.

These are some great examples to get you started. Although a lot of them are version 7.0 but the syntax is quite similar. If your having troubles converting, here is a nice migration from 6.3 to 7.0 provided by msdn.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top