I recently learned that the Virtual Earth vector generalization issue that I discovered earlier to has at least been partly remedied in a fix that Microsoft recently rolled out, by allowing developers to turn it off:
From this (note the significant gaps and overlaps):
To this:
Gaps and overlaps no longer occur, and polygons are now true to the source KML.
This just came out as a fix issued November 16, and is implemented via a VEMap method: map.EnableShapeDisplayThreshold(false); However, I noted that the VE team still needs to fix the generalization algorithm that’s still being implemented by default or when map.EnableShapeDisplayThreshold is set to true.
One of my colleagues has however reported that he's still seeing some generalization issues in GeoRSS at some zoom levels despite the display threshold setting.
Per a forum post by the VE developer team (note that it also includes some other recently announced enhancements as well):
The Virtual Earth v6 API has been updated. The below list is not comprehensive. However, it talks about the bugs that has been dicussed on the forums.
Bug Fixes:
- Collection import is now working on V6.
- VEShapes appearing in wrong position when switching mapstyle has been fixed.
- Clicking on a pushpin/icon causes the infobox to appear at the top left corner of the page has been fixed.
- VEShape’s icons not updated with correct z-index after a VEShape.SetZIndex has been fixed.
- Setting font size on the body might mess up the navcontrol has been fixed.
- 3D showswitch parameter in LoadMap not working has been fixed.
New Features/Functionality:
- KML support for v6. This is similar to maps.live.com. More information at http://msdn2.microsoft.com/en-us/library/bb412471.aspx
You can try it out using the following example(please enter your own kml url). Please note that source parameter in VEShapeSourceSpecification needs to be a URL. Local files are not supported.
Code Block
var spec = new VEShapeSourceSpecification(VEDataType.ImportXML, http://enteryourkmlurlhere.htm");
map.ImportShapeLayerData(spec);
- Localization for VEMap.Find(where only search) & VEMap.GetDirections();
This is not in the documentation yet, but the following needs to be set for the GetDirections to return localized results:
Code Block
var options = new VERouteOptions();
options.UseMWS = true;
map.GetDirections(['redmond,wa','seattle,wa'],options);
//The UseMWS flag uses the MapPoint Web Service routing engine which provides localized
results. However, the generated route might be slightly different from the default routing engine’s route.
- Added new method VEMap.EnableShapeDisplayThreshold(boolean). Setting it to false will make prevent the mapcontrol from trying to merge points together and not draw polygons/polylines when they are too small.
If you’re seeing polygons/polylines being drawn incorrectly, do the following.
Code Block
map.EnableShapeDisplayThreshold(false);
- Added Time property to the VERoute, VERouteLeg & VERouteItinerary returned by VEMap.GetDirections. This property is a integer, in seconds. Not a string like the GetRoute call. More information in the SDK when it gets updated. http://msdn2.microsoft.com/en-us/library/bb429552.aspx
- The callback function in VEMap.Find, where only queries will now return all results, instead of only results of the highest confidence level found. The default disambiguation box will continues to display results of the highest confidence level found.
- The callback function in VEMap.Find will return all geocoded values for VEPlace. i.e It will return both the interpolated and rooftop result (if available) in VEPlace. More information can be found in the SDK when it gets updated. http://msdn2.microsoft.com/en-us/library/bb429615.aspx
- Birdseye in 3D is working now.
To Be Fixed/Updated:
- Mouse button missing from 3D mouse events. Will be fix when the 3D control gets updated. Coming soon.
Not Fixed:
- Multiple maps on the same page might cause the zoom buttons to be missing from 1 of the maps.
Workaround: Changing the order of how you load the map might solve the problem. i.e. Loading the second map before the first map will prevent this from happening.
If you order of the map div on the page look like this:
Div 1 (id='myMap1')
Div 2 (id='myMap2')
In you script do this instead:
Code Block
map2 = new VEMap('myMap2');
map2.LoadMap();
map1 = new
VEMap('myMap1');
map1.LoadMap();
- Invalid latlong in v5 mouse events when using the newest 3D control. Workaround: Only use the following code in v5 and only in the 3D mouse events.
Code Block
//This code is only nessecary for v5 mapcontrol when in 3D mode
//However, This will not work for when -3.142 < lat < -3.142 = 180 e.latLong.Longitude <= -180 e.latLong.Longitude >= 180))
{
//Convert latlong to a valid latlong
var r2d = 180.0 / Math.PI;
e.latLong = new
VELatLong(e.latLong.Latitude / r2d, e.latLong.Longitude / r2d);
}
0 Response for the " Virtual Earth and KML "
Post a Comment