locked
Bing Maps Ajax v7 Bugs RRS feed

  • General discussion

  • If you find any bugs in the control, please post them in this thread. It'll give the Bing Maps team a more central location to find the issues we're having with this release.

    The following issue I posted, now appears to be fixed. Good work guys!

    Setting the "enableSearchLogo" and "enableClickablLogo" mapOptions to "false" do not seem to make any difference. They are mentioned in the documentation, but perhaps they aren't actually implemented.

    You can find there documentation here: http://msdn.microsoft.com/en-us/library/gg427603.aspx

    Sometimes I wonder if the Bing Maps team fully tests before releasing...


    Microsoft MVP - Windows Live Platform
    Blog: http://pietschsoft.com  | Web.Maps.VE - ASP.NET AJAX Bing Maps Server Control
    Friday, December 3, 2010 4:23 AM

All replies

  • The nice zoom slider doesn't show up in Internet Explorer 8 when you mouseover the zoom buttons of the dashboard.


    The two checkboxes "show labels" and "enable tilt" from the map style dropdown of the dashboard don't show up in Safari Windows (but their caption are visible, it's only the checkbox itself that's missing).


    The event "imagerychanged" isn't sent when the map style is to Automatic, so you can't know which style is actually displayed.


    All documentation pages that refer to events named "somethingSomething" while they are actually named lowercase.


    Large polygons are wrongly drawn at the lowest zoom levels due to the horizontal repetition of the map.

    • Edited by wildpeaks Friday, December 3, 2010 9:42 AM
    Friday, December 3, 2010 9:31 AM
  • This is what I mean by large polygons:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html>
    <head>
    	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    	<script src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0" type="text/javascript" charset="UTF-8"></script>
    </head>
    <body onload="init()">
    
    <div id="map" style="position: relative; width: 800px; height: 350px;"></div>	
    	
    <script type="text/javascript">
    function init(){
    
    	var map = new Microsoft.Maps.Map(
    		document.getElementById("map"),
    		{
    			credentials: "YOUR-BING-KEY",
    			center: new Microsoft.Maps.Location(0, 0),
    			zoom: 2,
    			mapTypeId: Microsoft.Maps.MapTypeId.road
    		}
    	);
    
    	// This is right
    	map.entities.push(
    		new Microsoft.Maps.Polygon(
    			[
    				new Microsoft.Maps.Location(-30, -60),
    				new Microsoft.Maps.Location(30, -60),
    				new Microsoft.Maps.Location(30, 60),
    				new Microsoft.Maps.Location(-30, 60),
    				new Microsoft.Maps.Location(-30, -60)
    			],
    			{
    				strokeThickness: 0,
    				fillColor: new Microsoft.Maps.Color(125, 0, 255, 0)
    			}
    		)
    	);
    
    	// This is wrong
    	map.entities.push(
    		new Microsoft.Maps.Polygon(
    			[
    				new Microsoft.Maps.Location(-30, -100),
    				new Microsoft.Maps.Location(30, -100),
    				new Microsoft.Maps.Location(30, 100),
    				new Microsoft.Maps.Location(-30, 100),
    				new Microsoft.Maps.Location(-30, -100)
    			],
    			{
    				strokeThickness: 0,
    				fillColor: new Microsoft.Maps.Color(125, 255, 0, 0)
    			}
    		)
    	);
    }
    </script>
    
    </body>
    </html>
    

    Friday, December 3, 2010 9:39 AM
  • I think we need to be careful of the distinction between "bugs" and "things that don't work as you might expect them to ", otherwise this list might get unmanageable!

    • @wildpeaks - Safari on Windows is not a supported browser, so it's not a bug if it doesn't behave correctly... only Mac Safari is supported - http://msdn.microsoft.com/en-us/library/gg427618.aspx
    • The description of the imagerychanged event says that it fires "when the map imagery changes". This is a pretty dreadful description, I agree - the imagery changes when you pan or zoom the map, let alone when the automatic style switches to a different map style, but I don't think that's what it means. I think that the bug here is not with the event itself but with the documentation, which should read: "occurs when the mapTypeId changes". This would mirror the behaviour of the VEMap.onchangemapstyle event from v6.3. However, it might be useful to have a separate event that fires when the Auto mapTypeId decides to switch into a different view....
    • A couple of people have reported problems getting the click event to register on maps that have one or more tile layers, but I haven't yet been able to reproduce this myself, and nobody has pasted a reproduceable example yet.

    Beginning Spatial with SQL Server http://www.apress.com/book/view/1430218290
    Friday, December 3, 2010 12:26 PM
    Moderator
  •  

    >>The event "imagerychanged" isn't sent when the map style is to Automatic, so you can't know which style is actually displayed.

    the event to check for change of maptype is 'maptypechanged', subscribe to it to look for map type change. the syntax is as below:

    Microsoft.Maps.Events.addHandler(map, 'maptypechanged', function () { alert(map.getImageryId()); });

    Monday, December 6, 2010 10:53 PM
  • >> The nice zoom slider doesn't show up in Internet Explorer 8 when you mouseover the zoom buttons of the dashboard.

    Can you please explain a bit more, no repro for me on IE8. IS this specific to environment. Can you send the script you are trying to run?

    Monday, December 6, 2010 10:56 PM
  • >>The event "imagerychanged" isn't sent when the map style is to Automatic, so you can't know which style is actually displayed.

    the event to check for change of maptype is 'maptypechanged', subscribe to it to look for map type change. the syntax is as below:

    Microsoft.Maps.Events.addHandler(map, 'maptypechanged', function () { alert(map.getImageryId()); });

    @Hemant - ok, so the bug now becomes that the new "maptypechanged" event is not listed in the method reference anywhere :)

    Beginning Spatial with SQL Server http://www.apress.com/book/view/1430218290
    Monday, December 6, 2010 11:36 PM
    Moderator
  • Yeah! MSDN documentation is notified to update the info around 'maptypechanged' event.

    Monday, December 6, 2010 11:42 PM
  • There seems to be no way to limit or amend the list of available mapstyles in v7.

    Not only are there no dedicated methods or options to do so (like the previous VEMapOptions.EnableBirdseye), but also since there are no specific classes or ids assigned to the elements in the map style dropdown, you can't target them using CSS or Javascript either.

    Not really a "bug" but, unlike most omissions reported so far in the v7 control, this appears to be an example of functionality that can't easily be added back in by a developer themselves...


    Beginning Spatial with SQL Server http://www.apress.com/book/view/1430218290
    Thursday, December 9, 2010 11:12 AM
    Moderator
  • The altitudeMode property of a Location class referred to at http://msdn.microsoft.com/en-us/library/gg427612.aspx is actually called altitudeReference .

    Beginning Spatial with SQL Server http://www.apress.com/book/view/1430218290
    Friday, December 10, 2010 12:07 AM
    Moderator
  • The 'mouseout' event on the Map object fires each time the mouse cursor moves from one map tile image to another. The documentation states, "Occurs when the mouse cursor moves out of the area covered by the map." This is clearly not how it is working.

    http://msdn.microsoft.com/en-us/library/gg427609.aspx


    Microsoft MVP - Windows Live Platform
    Blog: http://pietschsoft.com | Web.Maps.VE - ASP.NET AJAX Bing Maps Server Control
    Thursday, December 16, 2010 3:21 PM
  • Just to let you all know that the API Method Reference at http://msdn.microsoft.com/en-us/library/gg427611.aspx has been updated to address many (in not all) of the documentation bugs reported here.

    So well done everyone, and keep them coming!


    Beginning Spatial with SQL Server http://www.apress.com/book/view/1430218290
    Saturday, December 18, 2010 8:56 AM
    Moderator
  • Thanks for reporting it. This is known issue which should be fixed in coming update
    Tuesday, December 21, 2010 1:47 AM
  • Yeah! altitudeMode is Type altitudeReference http://msdn.microsoft.com/en-us/library/gg427612.aspx

    Thanks for feedback

    Tuesday, December 21, 2010 1:53 AM
  • This is quite possible.

    1. Hide the Dashboard

    2. Place custom button to change stype pap.setView({mapTypeId: 'be'}); be: Birdeye; r:Road, a:Aerial: auto: Automatic.

    Thanks for feedback

    Tuesday, December 21, 2010 1:56 AM
  • Yeah, specially check out http://msdn.microsoft.com/en-us/library/gg427606.aspx, it was ways to intregate REST services with v7, adding infobox & few more addons
    Tuesday, December 21, 2010 1:59 AM
  • Yeah! altitudeMode is Type altitudeReference http://msdn.microsoft.com/en-us/library/gg427612.aspx

    Thanks for feedback

    Hi Hemant,

    The type on that page is correctly listed as altitudeReference - the error is that the property name itself should also be called altitudeReference, not altitudeMode.

    In other words, this is wrong:

    var location = new Microsoft.Maps.Location(52.75, 1.6);
    location.altitude = 100;
    location.altitudeMode = Microsoft.Maps.AltitudeReference.ellipsoid;

    This is right:

    var location = new Microsoft.Maps.Location(52.75, 1.6);
    location.altitude = 100;
    location.altitudeReference = Microsoft.Maps.AltitudeReference.ellipsoid;

     


    Beginning Spatial with SQL Server http://www.apress.com/book/view/1430218290
    Tuesday, December 21, 2010 3:48 PM
    Moderator
  • Got the point. Actually this is inline with constructor for v6.3.

    http://msdn.microsoft.com/en-us/library/bb412554.aspx

    It takes  VEAltitudeMode Enumeration as parameter, which can type (default/Relativetoground) as values. v7 has  AltitudeReference enumeration which takes (ground/ellipsoid) as parameter. So, the meaning remains same. MDN needs little tweaking of words.

    Tuesday, December 21, 2010 5:29 PM
  • ...MSDN needs little tweaking of words...

    ... well, it would certainly help if the official "method reference" could be tweaked to list all the methods available, and called them by the correct names :)

    While we're on the subject, the Tilelayer class appears to expose an undocumented setOptions() method that can be used to set options of an existing tilelayer (see, for example, http://social.msdn.microsoft.com/Forums/en-US/vemapcontroldev/thread/9da4c9db-4dfa-40d5-be73-9807e5a545af) yet this is not listed anywhere in the method reference:

    http://msdn.microsoft.com/en-us/library/gg427598.aspx


    Beginning Spatial with SQL Server http://www.apress.com/book/view/1430218290
    Wednesday, December 29, 2010 10:45 AM
    Moderator
  • Another documentation bug. The properties of the Location class described at http://msdn.microsoft.com/en-us/library/microsoft.maps.mapcontrol.location_members.aspx are latitude and longitude (not Latitude and Longitude ).
    Beginning Spatial with SQL Server http://www.apress.com/book/view/1430218290
    Sunday, January 9, 2011 2:30 PM
    Moderator
  • ... well, it would certainly help if the official "method reference" could be tweaked to list all the methods available, and called them by the correct names :)

    Thanks for the feedbacks. I see what is expectation here. This should possibly be fixed in next refresh.
    Wednesday, January 12, 2011 9:27 PM
  • Another documentation bug. The properties of the Location class described at http://msdn.microsoft.com/en-us/library/microsoft.maps.mapcontrol.location_members.aspx are latitude and longitude (not Latitude and Longitude ).
    Beginning Spatial with SQL Server http://www.apress.com/book/view/1430218290


    This msdn is pointing to Silverlight code, which is C# code. Location properties are correctly defined as Latitude & Longitude.

    Ajax control in JS have it in small case. Let me know if this is not the case.

    Thursday, January 13, 2011 2:07 AM
  • At high zoom levels some outlines of polygons are misplaced in Firefox (3.6.13)

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html>
     <head>
      <title></title>
      <script type="text/javascript" src="https://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0"></script>
    
      <script type="text/javascript">
      function GetMap()
      { 
       var map7 = new Microsoft.Maps.Map(document.getElementById("mapDiv"), 
           {credentials: "Your Bing Maps Key",
           zoom: 15});
    
       var center = map7.getCenter();
       var lat = center.latitude;
       var lon = center.longitude;
    
       var vertices = new Array(
      		 new Microsoft.Maps.Location(lat+2, lon+1), 
      		 center, 
      		 new Microsoft.Maps.Location(lat-2, lon+1));
       var poly = new Microsoft.Maps.Polygon(vertices);
       map7.entities.push(poly);
      }
      
      </script>
     </head>
     <body onload="GetMap();" >
      <div id='mapDiv' style="position:relative; width:500px; height:500px;"></div> 
     </body>
    </html>
    
    Friday, January 14, 2011 12:02 PM
  • At high zoom levels some outlines of polygons are misplaced in Firefox (3.6.13)


    Thanks for reporting. this is known issue, which should be fixed in next update.
    Friday, January 14, 2011 10:31 PM
  • Step 3 of this page ...

    http://msdn.microsoft.com/en-us/library/gg427624.aspx

    ... is wrong for SSL:

    <script charset="UTF-8" type="text/javascript" src="https://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0&ssl=1">
    </script>
    

    It says the parameter for SSL is "ssl=1", but it's "s=1", like it was in the V6.x API.

    Saturday, January 15, 2011 8:06 PM
  • All the stuff below was tested in Chrome 8 on Mac, Firefox 3.6 on mac and Internet Explorer 8 on Win7.

    Position Bug:

    1. With the map deep in the page

    Live example : http://pixyblue.com/BingBug_position.html

    How to reproduce :  put a high div before the map.

     

    <div style="width:200px; height: 1000px; background: #eee;">Some long content</div>
    <div id="map" style="width:600px; height: 300px; position: relative;"></div>
    

     

    A) Mouse over the mode button (Bird's eye). Notice the the menu position, far bellow the map.

    B) Use you mouse scroll. Notice how it zooms to the north, way off the center!

     

    2. With a margin (probably related to #1)

    Live example: http://pixyblue.com/BingBug_margins.html

    How to reproduce: Add a margin to a wrapping div. 

     

    <div class="content" style="margin-left: 200px; margin-top: 250px;">
     <div id="map" style="width:600px; height: 300px; position:relative"></div>
    </div>
    

    A) Mouse over the mode button (Bird's eye). Notice the appearing menu position, totally ignoring the margin. 

     

    B) Use you mouse scroll. The map zoom doesn't zoom to the center.


     

     

    Line-height issue

    With Internet Explorer 8 only: there's a vertical space between the tiles (as seen in the past example). 

    Solved by adding 

    .MicrosoftMap {
     line-height: 1px;
    }
    

     

     

     

    Saturday, January 22, 2011 11:48 AM
  • Step 3 of this page ...

    http://msdn.microsoft.com/en-us/library/gg427624.aspx

    ... is wrong for SSL:

     

    <script charset="UTF-8" type="text/javascript" src="https://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0&ssl=1">
    
    </script>
    
    

     

    It says the parameter for SSL is "ssl=1", but it's "s=1", like it was in the V6.x API.


    thanks for reporting. This is known issue & should be fixed in next refresh
    Thursday, January 27, 2011 11:14 PM
  • All the stuff below was tested in Chrome 8 on Mac, Firefox 3.6 on mac and Internet Explorer 8 on Win7.

    Position Bug:

    1. With the map deep in the page

    Live example : http://pixyblue.com/BingBug_position.html

    How to reproduce :  put a high div before the map.

     

    <div style="width:200px; height: 1000px; background: #eee;">Some long content</div>
    
    <div id="map" style="width:600px; height: 300px; position: relative;"></div>
    
    

     

    A) Mouse over the mode button (Bird's eye). Notice the the menu position, far bellow the map.

    B) Use you mouse scroll. Notice how it zooms to the north, way off the center!

     

    2. With a margin (probably related to #1)

    Live example: http://pixyblue.com/BingBug_margins.html

    How to reproduce: Add a margin to a wrapping div. 

     

    <div class="content" style="margin-left: 200px; margin-top: 250px;">
    
     <div id="map" style="width:600px; height: 300px; position:relative"></div>
    
    </div>
    
    

    A) Mouse over the mode button (Bird's eye). Notice the appearing menu position, totally ignoring the margin. 

     

    B) Use you mouse scroll. The map zoom doesn't zoom to the center.


     

     

    Line-height issue

    With Internet Explorer 8 only: there's a vertical space between the tiles (as seen in the past example). 

    Solved by adding 

    .MicrosoftMap {
    
     line-height: 1px;
    
    }
    
    

     

     

     


    Thanks for feedback. Bugs submitted for #1 & #2. #3 is by design right now.

     

     

    Friday, January 28, 2011 12:46 AM
  • So for now should I just add both the ssl=1&s=1?
    Tuesday, February 1, 2011 6:12 PM
  • Map.SetView() doesn't work correctly when the supplied LocationRect crosses the 180th meridian. The map appears to centre on the middle of the LocationRect, but zoom level is reset to 1.

    See http://social.msdn.microsoft.com/Forums/en-US/vemapcontroldev/thread/707f71b3-e8f7-4e8d-99b6-59bbbe899481 for more details.


    Beginning Spatial with SQL Server http://www.apress.com/book/view/1430218290
    Wednesday, February 2, 2011 10:14 AM
    Moderator
  • 1. The width PushpinOptions setting does not work. 

    map.entities.push(

     

    new Microsoft.Maps.Pushpin(loc1, { text: '00301', width: 100 }));

    The above code maps the point and the text but the pushpin is still a set circular label.  Is there no way to get the text to appear in a rectangular label that autosizes to the text unless a special width is specified?

    2. FEATURE: Is there a way to get an EntityCollection to an array?  Centering a group of points (not in a polygon) is easy but code intensive.  If we could reference the entities portion of the map to get the location objects array it would be simple.

    CURRENT

        var loc1 = new Microsoft.Maps.Location(27.61449, -99.5185);
        var loc2 = new Microsoft.Maps.Location(37.02209, -85.9336);
        var loc3 = new Microsoft.Maps.Location(42.96323, -85.6678);
        var loc4 = new Microsoft.Maps.Location(38.95953, -85.8892);
        var loc5 = new Microsoft.Maps.Location(38.97091, -85.8718);
    
        map.entities.push(new Microsoft.Maps.Pushpin(loc1, { text: '00301', width: 100 }));
        map.entities.push(new Microsoft.Maps.Pushpin(loc2, { text: '00800' }));
        map.entities.push(new Microsoft.Maps.Pushpin(loc3, { text: '00822' }));
        map.entities.push(new Microsoft.Maps.Pushpin(loc4, { text: '01000' }));
        map.entities.push(new Microsoft.Maps.Pushpin(loc5, { text: '01001' }));
    
        var locations = []
        locations.push(loc1);
        locations.push(loc2);
        locations.push(loc3);
        locations.push(loc4);
        locations.push(loc5);
    
        map.setView({ bounds: Microsoft.Maps.LocationRect.fromLocations(locations) });
    

     WANT

        var loc1 = new Microsoft.Maps.Location(27.61449, -99.5185);
        var loc2 = new Microsoft.Maps.Location(37.02209, -85.9336);
        var loc3 = new Microsoft.Maps.Location(42.96323, -85.6678);
        var loc4 = new Microsoft.Maps.Location(38.95953, -85.8892);
        var loc5 = new Microsoft.Maps.Location(38.97091, -85.8718);
    
        map.entities.push(new Microsoft.Maps.Pushpin(loc1, { text: '00301', width: 100 }));
        map.entities.push(new Microsoft.Maps.Pushpin(loc2, { text: '00800' }));
        map.entities.push(new Microsoft.Maps.Pushpin(loc3, { text: '00822' }));
        map.entities.push(new Microsoft.Maps.Pushpin(loc4, { text: '01000' }));
        map.entities.push(new Microsoft.Maps.Pushpin(loc5, { text: '01001' }));
    
        map.setView({ bounds: Microsoft.Maps.LocationRect.fromLocations(map.entities.toArray) });
    
    Wednesday, February 2, 2011 5:10 PM
  • The map drawing appears to be incorrect when the <div> tag for the control does not have a matching </div> but instead the user uses short hand <div />.

    <div class="Test">
       <div id="myMap" class="Map" />
       This text should be below the map
    </div>
    

    The above code will not show the text which is outside the map div but inside the other.  In order to fix the problem you need to write the code:

    <div class="Test">
       <div id="myMap" class="Map"></div>
       This text should be below the map
    </div>
    
    
    Thursday, February 3, 2011 3:54 PM
  • There seems to be an issue with the control when you have multiple EntityCollections that have Polygons in them. When adding a mousemove event to the control, only Polygons in the last EntityCollection (which contains Polygons) added to the map's entities will be found in the event argument's target property. Pushpins do not appear to have the same problem. I have constructed a small proof of concept to show this. The left map has the issue I'm talking about and the right map shows what the expected behavior is.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html>
     <head>
     <script charset="UTF-8" type="text/javascript" src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0"></script>
     </head>
     <body>
     <div style="position: absolute; left: 0px; top: 0px; bottom: 0px; right: 50%;">
     <div id="Map1" style="z-index: 0; position: absolute; left: 0px; top: 0px; right: 0px; bottom: 0px;"></div>
     <div id="Map1_Message" style="position: absolute; right: 0;"></div>
     </div>
     <div style="position: absolute; left: 50%; top: 0px; bottom: 0px; right: 0px; border-left: 1px solid #000000;">
     <div id="Map2" style="z-index: 0; position: absolute; left: 0px; top: 0px; right: 0px; bottom: 0px;"></div>
     <div id="Map2_Message" style="position: absolute; right: 0;"></div>
     </div>
     
     <script type="text/javascript">
     //<![CDATA[
     //this map will only allow the last polygon (lower left) to be found as the target of the mousemove event
     var map = new Microsoft.Maps.Map(
     document.getElementById('Map1'),
     {credentials: 'Insert Credentials Here', mapTypeId: Microsoft.Maps.MapTypeId.road}
     );
     Microsoft.Maps.Events.addHandler(map, 'mousemove', function(e){document.getElementById('Map1_Message').innerHTML = "You are hovering over a " + e.targetType;});
     
     map.setView({center: new Microsoft.Maps.Location(0, 0)});
     
     var polygons = new Microsoft.Maps.EntityCollection();
     var polygonVertices = new Array(
     new Microsoft.Maps.Location(0, 0),
     new Microsoft.Maps.Location(30, 0),
     new Microsoft.Maps.Location(30, 60),
     new Microsoft.Maps.Location(0, 60),
     new Microsoft.Maps.Location(0, 0)
     );
     polygons.push(new Microsoft.Maps.Polygon(polygonVertices));
     map.entities.push(polygons);
     
     var polygons = new Microsoft.Maps.EntityCollection();
     var polygonVertices = new Array(
     new Microsoft.Maps.Location(-30, -60),
     new Microsoft.Maps.Location(0, -60),
     new Microsoft.Maps.Location(0, 0),
     new Microsoft.Maps.Location(-30, 0),
     new Microsoft.Maps.Location(-30, -60)
     );
     polygons.push(new Microsoft.Maps.Polygon(polygonVertices));
     map.entities.push(polygons);
     
     var pushpins = new Microsoft.Maps.EntityCollection();
     pushpins.push(new Microsoft.Maps.Pushpin(new Microsoft.Maps.Location(30, 60)));
     map.entities.push(pushpins);
     
     var pushpins = new Microsoft.Maps.EntityCollection();
     pushpins.push(new Microsoft.Maps.Pushpin(new Microsoft.Maps.Location(-30, -60)));
     map.entities.push(pushpins);
     
     
     
     
     //this map will only both of the polygons to be found as the target of the mousemove event
     var map = new Microsoft.Maps.Map(
     document.getElementById('Map2'),
     {credentials: 'Insert Credentials Here', mapTypeId: Microsoft.Maps.MapTypeId.road}
     );
     Microsoft.Maps.Events.addHandler(map, 'mousemove', function(e){document.getElementById('Map2_Message').innerHTML = "You are hovering over a " + e.targetType;});
     
     map.setView({center: new Microsoft.Maps.Location(0, 0)});
     
     var polygons = new Microsoft.Maps.EntityCollection();
     var polygonVertices = new Array(
     new Microsoft.Maps.Location(0, 0),
     new Microsoft.Maps.Location(30, 0),
     new Microsoft.Maps.Location(30, 60),
     new Microsoft.Maps.Location(0, 60),
     new Microsoft.Maps.Location(0, 0)
     );
     polygons.push(new Microsoft.Maps.Polygon(polygonVertices));
     var polygonVertices = new Array(
     new Microsoft.Maps.Location(-30, -60),
     new Microsoft.Maps.Location(0, -60),
     new Microsoft.Maps.Location(0, 0),
     new Microsoft.Maps.Location(-30, 0),
     new Microsoft.Maps.Location(-30, -60)
     );
     polygons.push(new Microsoft.Maps.Polygon(polygonVertices));
     map.entities.push(polygons);
     
     var pushpins = new Microsoft.Maps.EntityCollection();
     pushpins.push(new Microsoft.Maps.Pushpin(new Microsoft.Maps.Location(30, 60)));
     map.entities.push(pushpins);
     
     var pushpins = new Microsoft.Maps.EntityCollection();
     pushpins.push(new Microsoft.Maps.Pushpin(new Microsoft.Maps.Location(-30, -60)));
     map.entities.push(pushpins);
     //]]>
     </script>
     </body>
    </html>
    
    
    • Edited by strimpster Monday, February 28, 2011 11:10 PM Removed actual credentials
    Friday, February 4, 2011 10:03 PM
  • @strimpster I'm also seeing that behaviour in the app I'm developing at the moment. Causing us real headaches to try and workaround. Can anyone else confirm this is an issue for them?
    Monday, February 7, 2011 3:57 PM
  • Regarding bugs in Bing Maps Ajax API: I've looked at the supported browsers list and I think the notion of "Supported Browsers" need to be cleared more - especially in relation to "atlastcompat.js". 

    In the application I'm working on - which is an embeddable widget not entirely unlike Bing Maps Ajax - we lately started encountering a lot of problems when our customers embed our widget in pages that also contain embedded Bing Maps. Apparently when loaded in any browser other then IE7 and 8, atlastcompat.js comes into play and clobbers huge portions of the hosting browser's APIs to make them look more like Internet Explorer.

    This would have worked nicely if not for the fact that the implementation is far from being complete, and as a result any Javascript code that relies on capability detection to support multiple browsers (like any implementation should, really) breaks horribly when Bing Maps Ajax is present. Here are a few choice examples:

    1. atlascompat.js emulates IE's non DOM event handling using ELEMENT.attachEvent(), but it does not inter-operate with events sent using ELEMENT.dispatchEvent()

    2. atlascompat.js emulate's IE's ELEMENT.currentStyle property, but the resulting object contains very little of the long list of supported style properties, so that code that detects ELEMENT.currentStyle and tries to use it to check, for example, the font-size of an element will get an undefined value which is not what MSDN defines for that property ( http://msdn.microsoft.com/en-us/library/ms530759(v=vs.85).aspx ).

    I think its a huge problem that an embeddable Javascript widget takes liberty in adding this huge library API to a containing website, and then does such a bad job at it. Not that I think that making a passable attempt at fully implementing an IE API using atlascompat.js would have been good enough - if its not 100% compatible then you are going to break 3rd party's application while leaving the 3rd party developer with no recurse save for implementing a "Detect atlascompat.js and stop using capability detection". It would have been better if all these things would have been namespaced so that only the relying code can access them.

    Thursday, February 10, 2011 9:54 AM
  • Map.SetView() doesn't work correctly when the supplied LocationRect crosses the 180th meridian. The map appears to centre on the middle of the LocationRect, but zoom level is reset to 1.

    See http://social.msdn.microsoft.com/Forums/en-US/vemapcontroldev/thread/707f71b3-e8f7-4e8d-99b6-59bbbe899481 for more details.


    Beginning Spatial with SQL Server http://www.apress.com/book/view/1430218290

    This is known issue with V7 mapcontrol & would be fixed in upcoming updates to it. I will repond once the updates are available.
    Tuesday, February 15, 2011 11:02 PM
  • I just noticed a problem ( or bug ) that occurred yesterday with the map control in my asp.net project.  I have a standard asp button and the map inside of an update panel, when the button is clicked the map disappears.  This was working two weeks ago when last I worked on the project; nothing has changed on the page which could affect the map.

    I have created a demo page which demonstrates the problem  

    http://demos.lizard-design.com/bingmap/

     

    Regards Nicho

    Thursday, February 17, 2011 10:13 AM
  • All the stuff below was tested in Chrome 8 on Mac, Firefox 3.6 on mac and Internet Explorer 8 on Win7.

    Position Bug:

    1. With the map deep in the page

    Live example : http://pixyblue.com/BingBug_position.html

    How to reproduce :  put a high div before the map.

     

    <div style="width:200px; height: 1000px; background: #eee;">Some long content</div>
    
    
    
    <div id="map" style="width:600px; height: 300px; position: relative;"></div>
    
    
    
    

     

    A) Mouse over the mode button (Bird's eye). Notice the the menu position, far bellow the map.

    B) Use you mouse scroll. Notice how it zooms to the north, way off the center!

     

    2. With a margin (probably related to #1)

    Live example: http://pixyblue.com/BingBug_margins.html

    How to reproduce: Add a margin to a wrapping div. 

     

    <div class="content" style="margin-left: 200px; margin-top: 250px;">
    
    
    
     <div id="map" style="width:600px; height: 300px; position:relative"></div>
    
    
    
    </div>
    
    
    
    

    A) Mouse over the mode button (Bird's eye). Notice the appearing menu position, totally ignoring the margin. 

     

    B) Use you mouse scroll. The map zoom doesn't zoom to the center.


     

     

    Line-height issue

    With Internet Explorer 8 only: there's a vertical space between the tiles (as seen in the past example). 

    Solved by adding 

    .MicrosoftMap {
    
    
    
     line-height: 1px;
    
    
    
    }
    
    
    
    

     

     

     


    Thanks for feedback. Bugs submitted for #1 & #2. #3 is by design right now.

     

     

    Hi,

    Several critical bugs have been submited, and I've got a project (almost going live) with the sames bugs reported by Mr.Nicolas. Do you have any timeframe for the release of the next update? Is there any site where we can check the status of these bugs?

    Also, this is probably a bug in jQuery, but using jquery 1.4.2+ on the same page with the map, and clicking on a polygon which has been drawn on it, throws a javascript exception (just in IE). I believe this is related with the fact that in IE the polygons are drawn using VML and that jQuery does not correctly support it (event-wise).

    Wednesday, February 23, 2011 9:43 AM
  • I've had to come up with a solution to the problem with the Road popup being located in the wrong place based on scroll location and I think that I have some code that can help you others out that are having the same problem. While this does not fix the incorrect nature of the Bing Map, it does prevent this from occurring. Basically, my solution was to scroll to the top of the page, fire the click event of the Road menu item so that Bing Maps sets up the correct locations of the popup, click it again to hide the popup, and finally scroll back to wherever the browser was originally located in the page. You may see a minor flicker as it does this, but it is way better than the bug. To use this, simply call the function using the following code after you instantiate your map:

     

    setTimeout(fixBingMapsBug, 0);
    

     

    The function can be found below:

     

    function fixBingMapsBug() {
     //only run this once per page render
     if (window.fixedBingMapsBug == undefined || !fixedBingMapsBug) {
      fixedBingMapsBug = true;
      
      var bingMapsRoadNavigationButton = $('.NavBar_button.NavBar_typeButton').get(0);
      var eventToFire;
    if (document.createEventObject) { //IE eventToFire = document.createEventObject(); } else { //rest of browsers eventToFire = document.createEvent('MouseEvents'); eventToFire.initMouseEvent( 'click', true, true, window, 1, 0, 0, 0, 0, false, false, true, false, 0, null );
    }



    var currentScroll = $(document).scrollTop(); //scroll to top and fire click event scroll(0, 0); if (bingMapsRoadNavigationButton.fireEvent) { //IE bingMapsRoadNavigationButton.fireEvent('onclick', eventToFire); bingMapsRoadNavigationButton.fireEvent('onclick', eventToFire); } else { //rest of browsers bingMapsRoadNavigationButton.dispatchEvent(eventToFire); bingMapsRoadNavigationButton.dispatchEvent(eventToFire); } //scroll back to location scroll(0, currentScroll); } }

     

    As a note, I am using jQuery in the code, so you will need to add that library if not already done. This solution alone will fix the problem with example #1 above. To fix the second variation of the bug (example #2 above), it appears that changing the CSS can fix that (along with using the above javascript to ensure that the location is correct):

     

    <div class="content" style="margin-left: 200px; margin-top: 250px; width:600px; height: 300px; position: absolute;">
     <div id="map" style="position:absolute; left:0; right:0; bottom:0; top:0"></div>
    </div>
    
    I hope that this can help you guys out as we try to work around these issues. If anyone has a better solution, please share so that we can all benefit.

     

    • Edited by strimpster Tuesday, March 1, 2011 3:37 PM I was testing IE with Chrome Frame, so I didn't realize that it wouldn't work in IE. I added in the changes for it to work in IE.
    Monday, February 28, 2011 11:03 PM
  • I've had to come up with a solution to the problem with the Road popup being located in the wrong place based on scroll location and I think that I have some code that can help you others out that are having the same problem. While this does not fix the incorrect nature of the Bing Map, it does prevent this from occurring. Basically, my solution was to scroll to the top of the page, fire the click event of the Road menu item so that Bing Maps sets up the correct locations of the popup, click it again to hide the popup, and finally scroll back to wherever the browser was originally located in the page. You may see a minor flicker as it does this, but it is way better than the bug. To use this, simply call the function using the following code after you instantiate your map:

     

    setTimeout(fixBingMapsBug, 0);
    
    

     

    The function can be found below:

     

    function fixBingMapsBug() {
    
     //only run this once per page render
    
     if (window.fixedBingMapsBug == undefined || !fixedBingMapsBug) {
    
     fixedBingMapsBug = true;
    
     
    
     var bingMapsRoadNavigationButton = $('.NavBar_button.NavBar_typeButton').get(0);
    
     var eventToFire;
    if (document.createEventObject) { //IE eventToFire = document.createEventObject(); } else { //rest of browsers eventToFire = document.createEvent('MouseEvents'); eventToFire.initMouseEvent( 'click', true, true, window, 1, 0, 0, 0, 0, false, false, true, false, 0, null );
    }



    var currentScroll = $(document).scrollTop(); //scroll to top and fire click event scroll(0, 0); if (bingMapsRoadNavigationButton.fireEvent) { //IE bingMapsRoadNavigationButton.fireEvent('onclick', eventToFire); bingMapsRoadNavigationButton.fireEvent('onclick', eventToFire); } else { //rest of browsers bingMapsRoadNavigationButton.dispatchEvent(eventToFire); bingMapsRoadNavigationButton.dispatchEvent(eventToFire); } //scroll back to location scroll(0, currentScroll); } }

     

    As a note, I am using jQuery in the code, so you will need to add that library if not already done. This solution alone will fix the problem with example #1 above. To fix the second variation of the bug (example #2 above), it appears that changing the CSS can fix that (along with using the above javascript to ensure that the location is correct):

     

    <div class="content" style="margin-left: 200px; margin-top: 250px; width:600px; height: 300px; position: absolute;">
    
     <div id="map" style="position:absolute; left:0; right:0; bottom:0; top:0"></div>
    
    </div>
    
    
    I hope that this can help you guys out as we try to work around these issues. If anyone has a better solution, please share so that we can all benefit.

     

    These issues are fixed on fixed updates which would be releasing very soon. I will update once the changes are live.
    Tuesday, March 1, 2011 10:03 PM
  • I have 2 questions with the new version of Bing Maps v7

    1. In our case we have Polygon data which we do not shown in the angled view due to the lack of altitude values. We need a way to distinguish between the Angled view and Satellite view in the automatic mode. This will help us to hide polygon data map switches to angled view when the chosen map view is Automatic.
    2. Until the above feature is completed we would need a way in the API to hide the Automatic option. Currently we are altering the CSS to hide it. Ideally we need a API method to do it.

    Thanks.

     

    Wednesday, March 2, 2011 10:36 AM
  • You can use event imagerychanged and the function getImageryId to know what type of view is being displayed.

     

      var map = new Microsoft.Maps.Map(
        document.getElementById("map"),
        {
          credentials: "YOUR-BING-KEY",
          mapTypeId: Microsoft.Maps.MapTypeId.auto
        }
      );
    
      Microsoft.Maps.Events.addHandler(map, "imagerychanged", function(){
        var style = this.target.getImageryId();
        //
        // "style" contains the type of imagery being displayed
        //
      });

     

     

     


    Active Bing Maps programming community at StackOverflow:

    http://stackoverflow.com/questions/tagged/bing-maps

    Wednesday, March 2, 2011 10:50 AM
  • To add to wildpeaks response,

    The imageryId for "Angled view" styles will be NativeBirdseye or EnhancedBirdseye.

    Non-angled automatic view styles are Aerial or Road.

    There is currently no way using the API to disable individual map styles.


    twitter: @alastaira blog: http://alastaira.wordpress.com/
    Wednesday, March 2, 2011 3:13 PM
    Moderator
  • The 'mouseout' event on the Map object fires each time the mouse cursor moves from one map tile image to another. The documentation states, "Occurs when the mouse cursor moves out of the area covered by the map." This is clearly not how it is working.

    http://msdn.microsoft.com/en-us/library/gg427609.aspx


    Microsoft MVP - Windows Live Platform
    Blog: http://pietschsoft.com | Web.Maps.VE - ASP.NET AJAX Bing Maps Server Control

    This is fixed & is live as I speak. Please clear cache/cookies & run the same code. If it still repro's make sure you are hitting latest bits
    alert('MapControl Version: ' + Microsoft.Maps.Map.getVersion()); should gives 7.0.20110224212311.97

     Also check the updated SDK with inbuild Infobox support http://msdn.microsoft.com/en-us/library/gg427611.aspx.

    Thanks for feedback. we really count on them, so keep them coming.

    Thursday, March 3, 2011 11:05 PM
  • ...MSDN needs little tweaking of words...

    ... well, it would certainly help if the official "method reference" could be tweaked to list all the methods available, and called them by the correct names :)

    While we're on the subject, the Tilelayer class appears to expose an undocumented setOptions() method that can be used to set options of an existing tilelayer (see, for example, http://social.msdn.microsoft.com/Forums/en-US/vemapcontroldev/thread/9da4c9db-4dfa-40d5-be73-9807e5a545af) yet this is not listed anywhere in the method reference:

    http://msdn.microsoft.com/en-us/library/gg427598.aspx


    Beginning Spatial with SQL Server http://www.apress.com/book/view/1430218290

    SDK is updated with tile setoptions along with inbuild Infobox support http://msdn.microsoft.com/en-us/library/gg427611.aspx.

    Thanks for feedback. we really count on them, so keep them coming.

     

    Thursday, March 3, 2011 11:06 PM
  • Step 3 of this page ...

    http://msdn.microsoft.com/en-us/library/gg427624.aspx

    ... is wrong for SSL:

     

    <script charset="UTF-8" type="text/javascript" src="https://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0&ssl=1">
    
    </script>
    
    

     

    It says the parameter for SSL is "ssl=1", but it's "s=1", like it was in the V6.x API.


    Updated SDK is available with fix & with inbuild Infobox support http://msdn.microsoft.com/en-us/library/gg427611.aspx.

     

    Thursday, March 3, 2011 11:09 PM
  • All the stuff below was tested in Chrome 8 on Mac, Firefox 3.6 on mac and Internet Explorer 8 on Win7.

    Position Bug:

    1. With the map deep in the page

    Live example : http://pixyblue.com/BingBug_position.html

    How to reproduce :  put a high div before the map.

     

    <div style="width:200px; height: 1000px; background: #eee;">Some long content</div>
    
    <div id="map" style="width:600px; height: 300px; position: relative;"></div>
    
    

     

    A) Mouse over the mode button (Bird's eye). Notice the the menu position, far bellow the map.

    B) Use you mouse scroll. Notice how it zooms to the north, way off the center!

     

    2. With a margin (probably related to #1)

    Live example: http://pixyblue.com/BingBug_margins.html

    How to reproduce: Add a margin to a wrapping div. 

     

    <div class="content" style="margin-left: 200px; margin-top: 250px;">
    
     <div id="map" style="width:600px; height: 300px; position:relative"></div>
    
    </div>
    
    

    A) Mouse over the mode button (Bird's eye). Notice the appearing menu position, totally ignoring the margin. 

     

    B) Use you mouse scroll. The map zoom doesn't zoom to the center.


     

     

    Line-height issue

    With Internet Explorer 8 only: there's a vertical space between the tiles (as seen in the past example). 

    Solved by adding 

    .MicrosoftMap {
    
     line-height: 1px;
    
    }
    
    

     

     

     


    These issues are fixed & are live as I speak. Please clear cache/cookies & click on links. If it still repro's make sure you are hitting latest bits
    alert('MapControl Version: ' + Microsoft.Maps.Map.getVersion()); should gives 7.0.20110224212311.97

    Thanks for feedback. we really count on them, so keep them coming.

    Thursday, March 3, 2011 11:11 PM
  • So for now should I just add both the ssl=1&s=1?

    Nope just add s=1 one. Updated SDK is available now
    Thursday, March 3, 2011 11:12 PM
  • To add to wildpeaks response,

    The imageryId for "Angled view" styles will be NativeBirdseye or EnhancedBirdseye.

    Non-angled automatic view styles are Aerial or Road.

    There is currently no way using the API to disable individual map styles.


    twitter: @alastaira blog: http://alastaira.wordpress.com/
    you can now add showMapTypeSelector:false which will hide the mapstyle selector. you can then control the mapstyle using setOptions
    http://msdn.microsoft.com/en-us/library/gg427603.aspx
    Thursday, March 3, 2011 11:17 PM
  • These issues are fixed & are live as I speak. Please clear cache/cookies & click on links. If it still repro's make sure you are hitting latest bits
    alert('MapControl Version: ' + Microsoft.Maps.Map.getVersion()); should gives 7.0.20110224212311.97

    Thanks for feedback. we really count on them, so keep them coming.

    Thursday, March 3, 2011 11:28 PM
  • These issues are fixed & are live as I speak. Please clear cache/cookies & click on links. If it still repro's make sure you are hitting latest bits
    alert('MapControl Version: ' + Microsoft.Maps.Map.getVersion()); should gives 7.0.20110224212311.97

    Thanks for feedback. we really count on them, so keep them coming.


    Hi,

    I can confirm that the "offset" issue has been resolved. Nevertheless, if I may say so, it was done in a very poor way. Basically the first time one interacts with the map the page is scrolled all the way up. So, if i have a map at the bottom of the page and I click it, I lose complete context and I'll have to scroll down again.

    Try it with Mr.Nicolas above example: http://pixyblue.com/BingBug_position.html.

    Would this be reported as a "bug in the solution" or is this the "final" solution?

    Friday, March 4, 2011 8:54 AM
  • To add to wildpeaks response,

    The imageryId for "Angled view" styles will be NativeBirdseye or EnhancedBirdseye.

    Non-angled automatic view styles are Aerial or Road.

    There is currently no way using the API to disable individual map styles.


    twitter: @alastaira blog: http://alastaira.wordpress.com/
    you can now add showMapTypeSelector:false which will hide the mapstyle selector. you can then control the mapstyle using setOptions
    http://msdn.microsoft.com/en-us/library/gg427603.aspx

    Hi Hemant - as I said though, there is currently no way using the API to disable individual map styles.

    showMapTypeSelector:false hides the entire map style dropdown. If you want to restrict the user to only use, say, road and aerial but not birdseye (a pretty common scenario), then the only way to do so is to hide all the map style options and then insert your own map style selector.


    twitter: @alastaira blog: http://alastaira.wordpress.com/
    Friday, March 4, 2011 1:59 PM
    Moderator
  • These issues are fixed & are live as I speak. Please clear cache/cookies & click on links. If it still repro's make sure you are hitting latest bits
    alert('MapControl Version: ' + Microsoft.Maps.Map.getVersion()); should gives 7.0.20110224212311.97

    Thanks for feedback. we really count on them, so keep them coming.


    Hi,

    I can confirm that the "offset" issue has been resolved. Nevertheless, if I may say so, it was done in a very poor way. Basically the first time one interacts with the map the page is scrolled all the way up. So, if i have a map at the bottom of the page and I click it, I lose complete context and I'll have to scroll down again.

    Try it with Mr.Nicolas above example: http://pixyblue.com/BingBug_position.html.

    Would this be reported as a "bug in the solution" or is this the "final" solution?


    Yeah! I can see the behaviour & agree with you. This seems regression effect of fixing some bugs lastly. we have also exposed 'mousewheel' event on map, you might want to use to for better flexibility on mapcontrol http://msdn.microsoft.com/en-us/library/gg427609.aspx.

     

     

    Friday, March 4, 2011 7:29 PM
  • To add to wildpeaks response,

    The imageryId for "Angled view" styles will be NativeBirdseye or EnhancedBirdseye.

    Non-angled automatic view styles are Aerial or Road.

    There is currently no way using the API to disable individual map styles.


    twitter: @alastaira blog: http://alastaira.wordpress.com/
    you can now add showMapTypeSelector:false which will hide the mapstyle selector. you can then control the mapstyle using setOptions
    http://msdn.microsoft.com/en-us/library/gg427603.aspx

    Hi Hemant - as I said though, there is currently no way using the API to disable individual map styles.

    showMapTypeSelector:false hides the entire map style dropdown. If you want to restrict the user to only use, say, road and aerial but not birdseye (a pretty common scenario), then the only way to do so is to hide all the map style options and then insert your own map style selector.


    twitter: @alastaira blog: http://alastaira.wordpress.com/

    Yeah! Right now the way is to insert own map style selector. in future we might work of re-design the current nav bar, so the individual elements are not exposed.

    Thanks for feedback.

    Friday, March 4, 2011 7:32 PM
  • Thanks for the bug fixes, in particular for the position bug.

    But, when displaying the menu the first time after the page is scrolled, the map behaves wrongly. I demonstrated this issue here : http://coolony.co.il/bing_scroll_bug.html

    Steps to reproduce :

    1. Scroll down the page a little before doing anything on the map (This is done automatically in this example).
    2. Hover the map type menu (or the zoom one).
    3. The scroll position of the page reverts back to top, and the map mode menu is out of wack.


    And I got another, when adding Pushpins to the map on click, like demonstrated in the same page as before

    Steps to reproduce :

    1. Scroll down the page a little before doing anything on the map (This is *still* done automatically in this example).
    2. Click anywhere on the map to put a pushpin.
    3. The scroll position of the page reverts back to top.

    Successfully tested on Safari 5, Chrome 10, Opera 11 and Firefox 4.

     

    Sunday, March 6, 2011 5:32 PM
  • This is due to same reason where zooming the map on scrolled page causes scroling rather than zooming. Known issue which should be fixed in coming release. Thanks for feedback. 

    Monday, March 7, 2011 5:26 PM
  • Thanks for your answer.

    However, I see another potential issue that can be demonstrated in the same page, but probably not related to the scrolling one : when dragging the map, this sometimes triggers a click event on the point where the drag stops, and sometimes not.

    This is pretty annoying when I want to place new pushpins on user click, just like in my example. Did I forget to set some option or to make some test, or is it another (known?) issue?

    Monday, March 7, 2011 5:58 PM
  • These issues are fixed & are live as I speak. Please clear cache/cookies & click on links. If it still repro's make sure you are hitting latest bits
    alert('MapControl Version: ' + Microsoft.Maps.Map.getVersion()); should gives 7.0.20110224212311.97

    Thanks for feedback. we really count on them, so keep them coming.


    Hi,

    I can confirm that the "offset" issue has been resolved. Nevertheless, if I may say so, it was done in a very poor way. Basically the first time one interacts with the map the page is scrolled all the way up. So, if i have a map at the bottom of the page and I click it, I lose complete context and I'll have to scroll down again.

    Try it with Mr.Nicolas above example: http://pixyblue.com/BingBug_position.html .

    Would this be reported as a "bug in the solution" or is this the "final" solution?

    I can confirm this issue as well.  In my case, it makes Bing maps a real headache on my pages since all of the maps are not at the very top of the page.

    Any ETA to fix this?

    Monday, March 7, 2011 6:55 PM
  • @HemantGoyal - and thankyou for monitoring this thread and acknowledging issues as they are reported. (Don't know if you're the unlucky one who was assigned this task as part of their job role, or whether you're just doing it for fun ;) This thread is not exactly an ideal bug-tracking system, but we have at least demonstrated several issues that have been identified and fixed since being reported here, so that's definitely a good thing.

    Although it might sound like we're a bunch of whingeing developers, we are grateful for your input and any information you can give to let us know what's happening with ongoing development of the v7 control, so thanks.


    twitter: @alastaira blog: http://alastaira.wordpress.com/
    Monday, March 7, 2011 7:39 PM
    Moderator
  • @tanoshimi - First of all thanks for all the feedbacks about v7 mapcontrol. It always good to understand the user scenario's as most of the api's works perfect in standalone scenario's. Please continue to provide feedbacks & common asks about v7 control. I respond to make *whingeing* folks :) feel someone is listening to your issues.  

    -Hemant

    Wednesday, March 9, 2011 7:44 PM
  • "onScriptLoad" doesn't work properly in Ajax v7 to load the control on-demand like it did in v6.x.

    http://social.msdn.microsoft.com/Forums/en-US/vemapcontroldev/thread/cae8d2dd-5809-4ca6-ad08-796845a6b01b


    Microsoft MVP - Bing Maps
    Blog: http://pietschsoft.com | Web.Maps.VE - ASP.NET AJAX Bing Maps Server Control
    Monday, March 14, 2011 6:44 PM
  • I'm having the same problems with the page jumping to the top when hovering the mouse over the dashboard control for the first time. My map is not at the top of the page and it causes the page to jump
    This is really quite annoying and reproducible in almost every tested browser (IE7 worked but other than that it was broken).
    I had the same problem when attempting to get the location of a pushpin 
    (the call which caused the problem was when calling map.tryLocationToPixel(e.target.getLocation(), Microsoft.Maps.PixelReference.page);)
    I was able to fix this by getting the scrolltop first and then resetting it after making that call.. 
    However I really don't like making hacks like this and not completely sure how to do this for the dashboard.
    I suppose I could use jquery to bind to the onmouseover of the dashboard and capture the current scrollTop and position it back in a setTimeout call or something.. 
    Really ugly and not sure if it would work (depending on the order events fired)
    Below is a simple page to demonstrate the problem:
    

    <!
    DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head> <title>Test Page</title> <script type="text/javascript" src="https://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0&amp;ssl=1"></script> <script type="text/javascript"> var MAP_API_KEY = "<your maps key here>"; function LoadMap() { // Initialize the map var map_node = document.getElementById("map"); var map = new Microsoft.Maps.Map(map_node, { credentials: MAP_API_KEY, width: 500, height:500 }); } </script> </head> <body onload="LoadMap()"> <h1>Map Test</h1> <p>To demonstrate the problem, scroll down and then mouseover the navigation controls. The scroll offset of the page will jump to the top and then the menu will be in the wrong spot. I've tested and confirmed this in Chrome 8-10, Firefox 3.6, IE8 standards mode, IE9 standards mode However in IE7 standards mode it works correctly </p> <div style="margin: 300px 100px;background-color:#ccc"> <div id="map" style="position:relative; width:500px; height:500px;"></div> <!-- also triggers if position: absolute, uncomment the next line to test --> <!-- <div id="map" style="position:absolute; top:400px; left: 100px; width:500px; height:500px;"></div> --> </div> </body> </html>
    I'm really hoping this issue is fixed immediately as its preventing the release of our product.

    • Edited by mwolfe38 Monday, March 21, 2011 8:34 PM typos
    Monday, March 21, 2011 8:32 PM
  • I'm having the same problem in ie8 and chrome10.
    Monday, March 21, 2011 9:20 PM
  • Facing the same problem. After comparing few different scripts, i have observed if we do some task on map, On viewchange event, just for the first time, we can prevent this issue. This is just a work around till new release of Bing Ajax control .

    Have a look:

     

    <script type="text/javascript">
    
       var MM = Microsoft.Maps;
       var map = null;
    
    		 var locations = new Array();
       locations[0] = new MM.Location(47.60049157245997, -122.32924461364749);
       locations[1] = new MM.Location(47.605005650662044, -122.32572555541995);
    
     	 var current_location = new MM.Location(37.68382032669382, 13.886718749999991);
    		 var isFirstTime = true;
       function GetMap()
       {
       // Initialize the map
       map = new MM.Map(document.getElementById("myMap"), { credentials: "Your bing maps key" });
    
       map.setView({center:locations[0],zoom:12});
    			for (id=0;id<locations.length;id++)
    			{
    			var pushpin = new MM.Pushpin(locations[id], {});
    		 map.entities.push(pushpin);
       }
    
       // handle the viewchange event
       MM.Events.addHandler(map, 'viewchange', doSomething);
      }
    
    
      function doSomething(e)
      {
       if(isFirstTime){
       	//Just comment below line and observe the Issue appear again.
       	document.title +='view changed.' + map.tryLocationToPixel(current_location, MM.PixelReference.control);
       	isFirstTime=false;
       }
      }
    
    
      </script>

     

    Thursday, March 31, 2011 10:45 AM
  • Hi Hemant,

    I'm still facing this positioning bug and tried to get support via the bing-forum (without luck) - so I found this one.

    I also see these two (already mentioned) bugs, when the map is not on the top of the page:

    1) Hovering the dashboard (for changing road-style, birdeye-style or automatic-style) or zooming (doubleclick) into the map let the window jump to the top of the page. So the map is not really useful. If you e.g. scroll down to the map and you hover the dashboard -> it jumps to the top again. The second hovering / clicking doesn't result in the bug - only the first time! (Internet Explorer 9 / Firefox affected)


    2) On firefox the scrollbar jumps on pageload automatically down to the top of the map-div. You sill can't  see the map, but you are also not on the top of the page which is not a nice behaviour for the user experience / navigation, ... on your website. This error doesn't effect IE9 - but Firefox.

    If you wanna test both examples, here is my testsite with the msdn-example:
    http://heizung-sanitaer-zimmermann.de/testbingmaps.html

    Are there any planned fixes?

    Many thanks in advance and best regards

    yukiko
    Thursday, May 5, 2011 6:51 AM
  • As of 5 May 2011, the core Microsoft.Maps API JS (Map, EntityCollection, Location, etc) is not always available immediately.  We're seeing intermittent failures that are probably due to asynchronous loading of veapicore.js. It'd be one thing if it was consistent, but the current state - an unannounced maintenance patch with significant behaviour change - is difficult to stomach.

    Thursday, May 5, 2011 10:13 PM
  • As of 5 May 2011, the core Microsoft.Maps API JS (Map, EntityCollection, Location, etc) is not always available immediately.  We're seeing intermittent failures that are probably due to asynchronous loading of veapicore.js. It'd be one thing if it was consistent, but the current state - an unannounced maintenance patch with significant behaviour change - is difficult to stomach.

    As of 5 May 2011, I am seeing couple of issues, which might be due to above reason what Dan has mentioned. 

    1) JS error : Microsoft.Map.Location is not a constructor. This was working fine before but from 5th may i am seeing this error. The map doesnt render and give this error. But interestingly this doesnt happen all the time, it works if page is refreshed few times.

    2) Infobox html gets unstyled. Html placed in infobox works fine with the style defined, but as soon i pan the map, the styling goes out and html is displayed in a single line.

     

    Anyone else facing these issues?

     

    Thanks.

    Sufyan

    Friday, May 6, 2011 5:30 AM
  • Also, for the second issue i have said above, the line-height & white-space css properties gets disturbed on map panning.

    line-height goes 0 and white-space to nowrap.

     

    Friday, May 6, 2011 6:56 AM
  • Thanks Dan for your information. I could also recognize the constructor issue Sufyan mentioned.

    When I tested the hovering and scroll-down effect today the effect disappeared (it was there since at least march - not just a problem of the latest days) - maybe the bug-fixing is that fast *hope* :-) or it's just a side effect of the current problems Dan mentioned. But I hope it will keep fixed.

    Thanks anyway!

    Friday, May 6, 2011 11:27 AM
  • Hey Everyone,

    Well, that was a fun night. First off - apologies for the issues you all experienced with the control as a result of last night's release. We're actively working on getting a fix checked in and if all goes well we should have it published later today. In case you missed it, there are 2 fixes: 

    1. The DIV issue. There were two ways to fix this - set the height/width of the div or create a new div. We're recommended the former. So, ensure you're applications are setting these div element attributes to fix that problem. 

    2. The Lazy Loading issue. Use the OnScriptLoad parameter with a callback on the map control handler to detect when the script loads before calling map control classes and method (as is documented in v6.3): http://msdn.microsoft.com/en-us/library/cc980837.aspx.

    These fixes will continue to work after the fix goes in later today.

    Again, apologies for the issues and thanks for the active (and sometimes colorful) communications.

    P.S. I thought this forum was deprecated? :)

     

    Chris Pendleton

    Sr. Program Manager Lead, Bing Maps

    Microsoft Corp.

    Friday, May 6, 2011 5:32 PM
    Moderator
  • If this forum is deprecated, what is the appropriate channel to use to communicate bugs?  The map SDK doesn't seem to participate in Connect.

     

    The onScriptLoad parameter you reference - does it work in v7?  If it does, why is it not documented in v7?

    Friday, May 6, 2011 5:48 PM
  • P.S. I thought this forum was deprecated? :)

    I hope you're joking....

     

    Friday, May 6, 2011 5:56 PM
  • Yes, it works. Somehow the doc writers missed it with the first release and no one ever caught it.

    re: forum: we made an annoucement that we were moving it to the Bing Maps Community: http://www.bing.com/community/maps/f/12284.aspx. Notice the top of the forum is branded Windows Live.

    CP

    Friday, May 6, 2011 6:07 PM
    Moderator
  • Actually, I had announced the deprecation of the forums last summer - this forum is owned and branded Windows Live and is a legacy forum. We move the forum over to Bing Community: http://www.bing.com/community/maps/f/12284.aspx

    CP

    Friday, May 6, 2011 6:09 PM
    Moderator
  • If this forum is deprecated, why is it easier to get your attention here than on the other forums?  And why are people there saying to come here?  http://www.bing.com/community/maps/f/12284/t/667654.aspx
    Friday, May 6, 2011 6:31 PM
  • I don't want to go too off-topic because this thread, as the title suggests, is meant to be dedicated to reporting bugs in the v7 control.

    However, for anybody interested in the back-story of the "Tale of two forums", see this post from last year:

    http://social.msdn.microsoft.com/Forums/en-US/vemapcontroldev/thread/2c15f7d1-d767-41bb-8a5e-5785876dbfef

    Fortunately nothing ever came of it, so we're all still here. Please help us to keep this forum in order by reporting all bugs to only one central location.


    twitter: @alastaira blog: http://alastaira.wordpress.com/
    Friday, May 6, 2011 7:01 PM
    Moderator
  • It sure would be nice if we could report these bugs to Microsoft Connect (http://connect.microsoft.com) or a http://UserVoice.com site. Either of those would be is so much nicer than using a discussion forum for this purpose!

    I'm talking to you Bing Maps Team!


    Microsoft MVP - Bing Maps
    Blog: http://pietschsoft.com | Web.Maps.VE - ASP.NET AJAX Bing Maps Server Control
    Friday, May 6, 2011 7:59 PM
  • Hey Everyone,

    Well, that was a fun night. First off - apologies for the issues you all experienced with the control as a result of last night's release. We're actively working on getting a fix checked in and if all goes well we should have it published later today. In case you missed it, there are 2 fixes: 

    1. The DIV issue. There were two ways to fix this - set the height/width of the div or create a new div. We're recommended the former. So, ensure you're applications are setting these div element attributes to fix that problem. 

    2. The Lazy Loading issue. Use the OnScriptLoad parameter with a callback on the map control handler to detect when the script loads before calling map control classes and method (as is documented in v6.3): http://msdn.microsoft.com/en-us/library/cc980837.aspx.

    These fixes will continue to work after the fix goes in later today.

    Again, apologies for the issues and thanks for the active (and sometimes colorful) communications.

    P.S. I thought this forum was deprecated? :)

     

    Chris Pendleton

    Sr. Program Manager Lead, Bing Maps

    Microsoft Corp.

    I don't understand what the issues are so the fixes don't really help me.  The two issues I'm experiencing are as followes:

     

    1. I am using the following url to load the Map Control https://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0&ssl=1 but the js and css files are not loaded through ssl.  It appears that the paramter has been changed from "ssl=1" to "s=1".  Can you please confirm this?

    2. The page that contains the map has a AJAX poller that checks for any new data on the server every few seconds, reverse AJAX is you will.  Every time the poller makes a request, the Bing Map div gets wider by 4px.  The containing div has percentage width.  Does it have to be fixed?

     

    Thanks

    Friday, May 6, 2011 8:59 PM
  • Secured calls URL is https://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0&s=1 . Please check the documentation http://msdn.microsoft.com/en-us/library/gg427624.aspx. There was a bug in documentation earlier, which was fixed lately but the handler call was always s=1.

    #2, This issue was fixed in previous release, please check on the latest version. In case you are able to repro, please send the URL.

    Friday, May 6, 2011 9:06 PM
  • @kapernando - please search through this thread - the ssl/s parameter issue has been mentioned several times already.
    twitter: @alastaira blog: http://alastaira.wordpress.com/
    Friday, May 6, 2011 9:12 PM
    Moderator
  • Thanks for the bug fixes, in particular for the position bug.

    But, when displaying the menu the first time after the page is scrolled, the map behaves wrongly. I demonstrated this issue here : http://coolony.co.il/bing_scroll_bug.html

    Steps to reproduce :

    1. Scroll down the page a little before doing anything on the map (This is done automatically in this example).
    2. Hover the map type menu (or the zoom one).
    3. The scroll position of the page reverts back to top, and the map mode menu is out of wack.
    And I got another, when adding Pushpins to the map on click, like demonstrated in the same page as before

    Steps to reproduce :

    1. Scroll down the page a little before doing anything on the map (This is *still* done automatically in this example).
    2. Click anywhere on the map to put a pushpin.
    3. The scroll position of the page reverts back to top.
    Successfully tested on Safari 5, Chrome 10, Opera 11 and Firefox 4.

     


    Could you try again same link. This should be fixed now.
    Saturday, May 7, 2011 2:01 AM
  • Hi Hemant,

    I'm still facing this positioning bug and tried to get support via the bing-forum (without luck) - so I found this one.

    I also see these two (already mentioned) bugs, when the map is not on the top of the page:

    1) Hovering the dashboard (for changing road-style, birdeye-style or automatic-style) or zooming (doubleclick) into the map let the window jump to the top of the page. So the map is not really useful. If you e.g. scroll down to the map and you hover the dashboard -> it jumps to the top again. The second hovering / clicking doesn't result in the bug - only the first time! (Internet Explorer 9 / Firefox affected)


    2) On firefox the scrollbar jumps on pageload automatically down to the top of the map-div. You sill can't  see the map, but you are also not on the top of the page which is not a nice behaviour for the user experience / navigation, ... on your website. This error doesn't effect IE9 - but Firefox.

    If you wanna test both examples, here is my testsite with the msdn-example:
    http://heizung-sanitaer-zimmermann.de/testbingmaps.html

    Are there any planned fixes?

    Many thanks in advance and best regards

    yukiko


    Hi Yukiko -

    Could you give a try again t your page. this issue should be fixed now.

    Saturday, May 7, 2011 2:02 AM
  • As of 5 May 2011, the core Microsoft.Maps API JS (Map, EntityCollection, Location, etc) is not always available immediately.  We're seeing intermittent failures that are probably due to asynchronous loading of veapicore.js. It'd be one thing if it was consistent, but the current state - an unannounced maintenance patch with significant behaviour change - is difficult to stomach.

    As of 5 May 2011, I am seeing couple of issues, which might be due to above reason what Dan has mentioned. 

    1) JS error : Microsoft.Map.Location is not a constructor. This was working fine before but from 5th may i am seeing this error. The map doesnt render and give this error. But interestingly this doesnt happen all the time, it works if page is refreshed few times.

    2) Infobox html gets unstyled. Html placed in infobox works fine with the style defined, but as soon i pan the map, the styling goes out and html is displayed in a single line.

     

    Anyone else facing these issues?

     

    Thanks.

    Sufyan


    Hi Sufyan

    Thanks for reporting. #1 issue could be fixed by using either scriptonload or calling the API after body onload. #2 issue is new one, meanwhile could you try infobox.setHtmlContent () to set the contents. It should work as expected.

    Saturday, May 7, 2011 2:06 AM
  • Also, for the second issue i have said above, the line-height & white-space css properties gets disturbed on map panning.

    line-height goes 0 and white-space to nowrap.

     


    Another option is to set the add 'line-height:100%'; of div style. 
    Saturday, May 7, 2011 2:07 AM
  • Hi Yukiko -

    Could you give a try again to your page. this issue should be fixed now.

     

    Hi Hemant, that's right - both issues don't appear any longer. Many Thanks.

     

    @CP: I had thought so too .. that the forums are only on bing-community but when I tried to get a response on the same question there (http://www.bing.com/community/maps/f/12264/t/667617.aspx) - nothing happened. So I found with Cris help a link to this forum and I got help - crazy :-)

     

    Thanks again!!

    Saturday, May 7, 2011 12:42 PM
  • Bing Maps 7 is not loading in FF4.  Disabled all the add-ins still error in following JS

    JS error : 

     

    Microsoft.Maps.Location is not a constructor
    http://localhost:8080/myMap.action

     

     

    Details

     

     map = new Microsoft.Maps.Map( renderEl,
    {
    credentials: 'key',
    center: new Microsoft.Maps.Location(latitude, longitude),
    mapTypeId: mapType,
    width: inWidth,
    height: inHeight,
    zoom: zoomLevel,
    showLogo: false,
    showDashboard: true,
    showCopyright: false
    });
    this.setCenter(latitude, longitude); 

     


    • Edited by smaskar Monday, May 9, 2011 8:30 AM changed the key
    Monday, May 9, 2011 8:30 AM
  • @smaskar - please see the discussion in http://social.msdn.microsoft.com/Forums/en-US/vemapcontroldev/thread/b4d7629b-4071-4eaf-8cbe-f041ee2b156e and see if any of those suggestions solve your problem
    twitter: @alastaira blog: http://alastaira.wordpress.com/
    Monday, May 9, 2011 8:58 AM
    Moderator
  • Pls try again with same code. It should be fixed now.
    HemantGoyal
    Wednesday, May 11, 2011 4:12 AM
  • I post this here too, since we don't have any information while contacting the team directly, I'll try on this forum and this specific thread.


    I saw that Keith and other (Chris, you...) answered the questions here and I would like to thank MSFT for this as you've been really listening to each of customers requests and it is well appreciated.

    Hemant, we have a serious problem caused by this kind of code:

    Sample of code to reproduce the bug

     

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html>
     <head>
     <title>Map with valid credentials</title>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
     </head>
     <body>
    		Title that should be displayed
    		<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
    		<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
    		<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
    		<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
     <iframe src="http://www.bingmapsportal.com/ISDK/AjaxV7" style="width: 600px; height: 500px;" />
     </body>
    </html>
     
    

     

     

    Description and effect

    So basicaly, it appears that if you set a map on a page and load it inside an iframe, it set the scroll automaticaly in order to display the map with a different behaviour depending on the browser:

    • IE9, IE8 : set the scroll in order to let the top of the map control appears at the bottom of the current window
    • FF3.6 : scroll effect, the scroll is set in order to display all the map control (top of the map control = top of the current window)
    • Not supported browser - FF4 : is okay
    • Not supported browser - Opera 11 : scroll effect, the scroll is set in order to display all the map control (top of the map control = top of the current window)

    The fact is, there is a bad scroll effect that was fixed during the 26th April version, but rolled back for some reasons.

    You can try it via this link: http://www.boonaert.net/pages/veforum/bing-v7_ScrollBug.html

    Here is the page that is loaded is the iSDK, a simple page that hosts a map control can be used and you get the same bug.

     

    Solution

    If the iframe is loaded in a different domain like in many of my cases, we cannot set the scroll of the parent page but it is what happened.

    So I've tried to set the scroll by using this kind of fix:

     

     if (window.parent != null)
     window.parent.scrollTo(0, 0);
    

     

    But you cannot do this due to security restriction if you are on different domains..

     

    Questions

    So my question is, what is up with this bug as, in many case we use this specific scenario in order to integrate Bing Maps application, we can't use another solution due to technical limitations so will it be fixed as in 26th April update?

    When can we expect a stable version of the map control in AJAX v7?


    MVP - Bing Maps - My blog (FR): http://blogs.developpeur.org/nicoboo/ Twitter: http://twitter.com/nicolasboonaert/
    Wednesday, May 11, 2011 2:54 PM
  • We're using Bing Map Ajax Control v7 and having some display problems on Safari after map is loaded, the styles for all input elements are missing on our web pages if map is displayed.

    The same issue can be reproduced on interactive SDK website on Safari 5: http://www.bingmapsportal.com/ISDK/AjaxV7, the style for button "Reset", "Run", "View HTML" is gone if map is displayed.

     

    Thursday, May 26, 2011 3:05 AM
  • @strimpster I found a work around for the issue where entity collections block mouse events from polygons that are underneath. It isn't ideal for all situations but should be fine for most. Simply set the zIndex to -1 on the entity layer. I've tested this on IE8 and FF3.6 with great success.

    Windows Live Developer MVP - http://rbrundritt.wordpress.com | http://inknowledge.co.uk
    Thursday, May 26, 2011 10:04 PM
    Moderator
  • The zIndex property on an Infobox in API7 doesn't get set in the html if you set the htmlContent property.

    (As of Mon 31st May - I'm sure this was working last week...!)

     

    eg

     pinInfobox = new Microsoft.Maps.Infobox(new Microsoft.Maps.Location(0,0), {htmlContent:"<div id='myID'>yadayadayada</div>", visible: true,zIndex:1000});

     

    This means any infoboxes will appear behind any markers with a z-index set with a z-index eg

    var pin = new Microsoft.Maps.Pushpin(center, {text: '1',zIndex:100});

     

    Regards,

    Gavin

    Tuesday, May 31, 2011 9:54 AM
  • There's a bug in the zoom logic when crossing longitude 180.  For example:

     

    start = new Microsoft.Maps.Location (33.9425, -118.408056); // LAX
    end = new Microsoft.Maps.Location(35.764722, 140.386389); // NRT
    var locs[];
    locs.push(start);
    locs.push(end);
    var bestview = Microsoft.Maps.LocationRect.fromLocations( locs );
    mapObject.setView( {bounds:bestview} );
    
    

    We want this view to show start and end and everything in between, centered somewhere in the Pacific, and crossing through 180/-180.  Instead it goes around the long way, through the Prime Meridian and everything in between, with start and end at the extreme far sides of the map  - missing exactly what we want (the Pacific). Zoom is taken to somewhere around 1.

    This also breaks if going East, from positive longitude to negative longitude. 

    Tuesday, May 31, 2011 12:57 PM
  • @gavin - Yeah! there is known issue with htmlContent property, you can use pinInfobox.setHtmlContent("<div id='myID'>yadayadayada</div>"); as workaround to set proper zindex for the entities on map.

    HemantGoyal
    Tuesday, May 31, 2011 5:54 PM
  • @rmyadsk - This is known issue with setview, which should be fixed soon. Thanks for reporting.
    HemantGoyal
    Tuesday, May 31, 2011 6:49 PM
  • @HemantGoyal - thanks for letting me know.

    I found a workaround - entityCollections have a working z-index property, so adding multiple markers and an infobox through separate entity collections allows me to set the appropriate z-index.

    Wednesday, June 1, 2011 8:24 AM
  • As of 5 May 2011, the core Microsoft.Maps API JS (Map, EntityCollection, Location, etc) is not always available immediately.  We're seeing intermittent failures that are probably due to asynchronous loading of veapicore.js. It'd be one thing if it was consistent, but the current state - an unannounced maintenance patch with significant behaviour change - is difficult to stomach.

    As of 5 May 2011, I am seeing couple of issues, which might be due to above reason what Dan has mentioned. 

    1) JS error : Microsoft.Map.Location is not a constructor. This was working fine before but from 5th may i am seeing this error. The map doesnt render and give this error. But interestingly this doesnt happen all the time, it works if page is refreshed few times.

    2) Infobox html gets unstyled. Html placed in infobox works fine with the style defined, but as soon i pan the map, the styling goes out and html is displayed in a single line.

     

    Anyone else facing these issues?

     

    Thanks.

    Sufyan


    Hi Sufyan

    Thanks for reporting. #1 issue could be fixed by using either scriptonload or calling the API after body onload. #2 issue is new one, meanwhile could you try infobox.setHtmlContent () to set the contents. It should work as expected.

    Bug #2 doesnot work as you said. Applying 'line-height:100%'; to the div style doesnt solve it either. Can you fix this on priority as this is a really ugly one.
    Wednesday, June 1, 2011 10:09 PM
  • @HemantGoyal - thanks, will be eagerly awaiting the fix.

     

    Separate issue - has anyone found a way to toggle the map from regular-sized (width and height specified in div style) to fullscreen and back?  I just tried using an overlay and it didn't work:

     

    // CSS
    
     .overlay {
      position:absolute;
      top:0;
      left:0;
      width:100%;
      height:100%;
      z-index:1000;
     }
    
    
    // jQuery
    
     $("#fullscreenLink").click(function() {
      $("#mapDiv").addClass("fullscreen");
     });
    

    Wednesday, June 1, 2011 10:21 PM
  • @MnsR - Could you try repro'ing the infobox bug with sethtmlcontent on http://www.bingmapsportal.com/ISDK/AjaxV7, infobox set html content link under infobox section? Is this browser specific? 
    HemantGoyal
    Thursday, June 2, 2011 4:48 AM
  • Hi Hemant,
    Thank you for guiding me in right direction. I think i have found the fix.

    If html content is set during initialization of infobox it breaks -

    var infobox = new Microsoft.Maps.Infobox(center, {htmlContent :'your content'}) 
    Also if you set infobox html content
    infobox.setHtmlContent('your content')
    before pushing it to map
    map.entities.push(infobox); 

    it breaks again.

    The right workaround for this is pushing the infobox first and then using setHtmlContent

    var infobox = new Microsoft.Maps.Infobox(center); 
    map.entities.push(infobox);
    infobox.setHtmlContent('your content');

    Regards,

    Monis


    Thursday, June 2, 2011 10:24 AM
  • Hi Hemant,
    Thank you for guiding me in right direction. I think i have found the fix.

    If html content is set during initialization of infobox it breaks -

    var infobox = new Microsoft.Maps.Infobox(center, {htmlContent :'your content'}) 
    Also if you set infobox html content
    infobox.setHtmlContent('your content')
    before pushing it to map
    map.entities.push(infobox); 

    it breaks again.

    The right workaround for this is pushing the infobox first and then using setHtmlContent

    var infobox = new Microsoft.Maps.Infobox(center); 
    map.entities.push(infobox);
    infobox.setHtmlContent('your content');

    Regards,

    Monis


    Hi Hemant,

    The above solution does slove the problem but only when there is 'single' infobox on the map. If you try to add more, the text in newly added infobox overflows and started blinking when map is panned. I am trying the following code. Please help me in this. This is tested in Chrome, Mozilla ( desktop), IPhone 4(safari) and native Andriod 2.2 browser.

    Note : Overflow happens when is text is long.

     

    <html>
     <head>
      <title></title>
     
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    
      <style>
    .bigInfoboxTop {
    	height: 7px;
    	width: 200px
    }
    
    .bigInfoboxMiddle {
    line-height:100%;
     background-color: #fff;
     background-repeat: repeat-y;
     padding-left: 10px;
     padding-right: 10px;
     width: 190px;
    }
    
    
    .bigInfoboxBottom {
    	height: 22px;
    	width: 200px
    }
    </style>
       <script charset="UTF-8" type="text/javascript" src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0"></script>
      <script type="text/javascript">
       var map = null;
    
    
    
       function GetMap()
       {
         try{
    	 map = new Microsoft.Maps.Map(document.getElementById("canvas"), {
          credentials : "Bing Map Key",
          center: new Microsoft.Maps.Location(45.5, -122.5),
          mapTypeId : Microsoft.Maps.MapTypeId.road,
          zoom : 7
         });
     	var center = map.getCenter();
        
          // Add a pin to the center of the map
          var pin = new Microsoft.Maps.Pushpin(center, {text: '1'}); 
          map.entities.push(pin);
          var infobox = new Microsoft.Maps.Infobox(center, {
    	 
         
    	 offset : new Microsoft.Maps.Point(-100, 120),
         showCloseButton : false
         
       });
    	 map.entities.push(infobox);  
    	 infobox.setHtmlContent ('<div class="bigInfoboxTop"></div><div class="bigInfoboxMiddle">This is Infobox This is Infobox This is Infobox This is Infobox This is Infobox</div><div class="bigInfoboxBottom"></div>')
    	
    	 var infoboxOptions = {width :200, height :100, showCloseButton: true, zIndex: 0, offset:new Microsoft.Maps.Point(10,0), showPointer: true}; 
    	  var infobox1 = new Microsoft.Maps.Infobox(new Microsoft.Maps.Location(36, 45), infoboxOptions);
    	 map.entities.push(infobox1);  
    	 infobox1.setHtmlContent ('<div class="bigInfoboxTop"></div><div class="bigInfoboxMiddle">This is Infobox This is Infobox This is Infobox This is Infobox This is Infobox</div><div class="bigInfoboxBottom"></div>')
    	
    	 
    var infobox2 = new Microsoft.Maps.Infobox(new Microsoft.Maps.Location(76, 45),infoboxOptions);
    	 map.entities.push(infobox2);  
    	 infobox2.setHtmlContent ('<div class="bigInfoboxTop"></div><div class="bigInfoboxMiddle">This is Infobox This is Infobox This is Infobox This is Infobox This is Infobox</div><div class="bigInfoboxBottom"></div>')
    	
    
    	 }
    	catch(e){
    		alert('Error');
    	}
       
    	}
    
    
    	
       </script>
    
    	
     </head>
     <body onload="GetMap();">
      
      <div id="canvas" style="position:relative;height:90%;width:100%">
      
      </div>
      
     </body>
    </html>
    
    

     

    I tried the below code in http://www.bingmapsportal.com/ISDK/AjaxV7. Same problem there. Infobox text overflows.

     

    map.entities.clear();
     var infoboxOptions = {width :200, height :100, showCloseButton: true, zIndex: 0, offset:new Microsoft.Maps.Point(10,0), showPointer: true};
     var defaultInfobox = new Microsoft.Maps.Infobox(map.getCenter(), infoboxOptions );  
     map.entities.push(defaultInfobox);
     defaultInfobox.setHtmlContent('<div style="background-color:White; border-style:solid;border-width:medium; border-color:DarkOrange; min-height:100px; position:absolute;top:0px; left:23px; width:240px;"><b id="infoboxTitle" style="position:absolute; top:10px; left:10px; width:220px;">myTitle</b><a id="infoboxDescription" style="position:absolute; top:30px; left:10px; width:220px;">DescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescription</a></div>');
    
    var defaultInfobox1 = new Microsoft.Maps.Infobox(new Microsoft.Maps.Location(36, 45));  
     map.entities.push(defaultInfobox1);
     defaultInfobox1.setHtmlContent('<div style="background-color:White; border-style:solid;border-width:medium; border-color:DarkOrange; min-height:100px; top:0px; left:23px; width:240px;"><b id="infoboxTitle" style="position:absolute; top:10px; left:10px; width:220px;">myTitle</b><a id="infoboxDescription" style="position:absolute; top:30px; left:10px; width:220px;">DescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescription</a></div>'); 
    

    This issue is unnecessarily consuming time. Please look into this.

    Thanks,

    Monis

     

    Thursday, June 2, 2011 1:23 PM
  • Seems like no way to prevent the other infobox's overflow. You might need to wait till this bug is fixed or for now, you can show one box open at a time.
    HemantGoyal
    Saturday, June 4, 2011 12:05 AM
  • Issue with events firing when using tryPixelToLocation().  This issue seems to be FF 3.6.17 specific.  The code works in IE8.

    In the code below the geoFenceMove(e) is never fired because the map.tryPixelToLocation(p) seems to block the geoFenceMove(e) event from firing.  If I removed the map.tryPixelToLocation(p) geoFenceMove(e) would then fire and execute.

    function geoFenceMoveStart(e)
      {
        _dragging = true;
        
        var p = new MM.Point(e.getX(), e.getY());
        _previousLoc = map.tryPixelToLocation(p);
      }
      
      function geoFenceMove(e)
      {
        if (_dragging)
        {
          // Do move logic
        }
       }
      
      function geoFenceMoveEnd(e)
      {
        _dragging = false;
      }
    

     

    Wednesday, June 8, 2011 3:49 PM
  • Found a new Infobox bug

    I have a hyperlink inside infobox. Clicking the link in the infobox doesnot goto link, in Iphone4,3 and Andriod 2.1,2.2.  I also tried putting a link in the infobox content in bing map v7 interative SDK under infobox -> setHtmlContent, this also failed on iphone/andriod. Works fine for desktop chrome.
    I am using the below piece of code.  Please look into this.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html>
     <head>
     <title></title>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
    
     <style>
    .bigInfoboxTop {
     height: 7px;
     width: 200px
    }
    
    .bigInfoboxMiddle {
     background-color: #fff;
     background-repeat: repeat-y;
     padding-left: 10px;
     padding-right: 10px;
     width: 190px
    
     
    }
    
    .bigInfoboxBottom {
     height: 22px;
     width: 200px
    }
    </style>
     <script charset="UTF-8" type="text/javascript" src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0"></script>
    
     <script type="text/javascript">
     var map = null;
    
    
    
     function GetMap()
     {
     try{
     map = new Microsoft.Maps.Map(document.getElementById("canvas"), {
     credentials : "Bing Map Key",
    
     center: new Microsoft.Maps.Location(45.5, -122.5),
     mapTypeId : Microsoft.Maps.MapTypeId.road,
     zoom : 7
     });
     var center = map.getCenter();
     
     // Add a pin to the center of the map
     var pin = new Microsoft.Maps.Pushpin(center, {text: '1'});
    
     map.entities.push(pin);
     var infobox = new Microsoft.Maps.Infobox(center, {
     offset : new Microsoft.Maps.Point(-100, 120),
     showCloseButton : false
     
     });
     map.entities.push(infobox);
    infobox.setHtmlContent('<div class="bigInfoboxTop"></div><div class="bigInfoboxMiddle"><a href="http://www.bing.com">This is Infobox</a>This is InfoboxThis is Infobox This is Infobox This is Infobox</div><div class="bigInfoboxBottom"></div>')
    
     
     }
     catch(e){
     alert('Error');
     }
     
     }
    
    
     
     </script>
    
     
    
     </head>
     <body onload="GetMap();">
     <div id="canvas" style="position:relative;height:500px;width:600px">
    
     </div>
     
     </body>
    </html>
    


    Thanks,

    Monis

    Saturday, June 11, 2011 10:01 AM
  • Yet another bug found......

    When you create a Microsoft.Maps.InfoBox and set the Description to have a string that contains HTML tags it doesn't get displayed correctly.

    Here's an example of what I plugged into the "Infobox title/description" Infobox example within the v7 interactive SDK:

     

    map.entities.clear(); 
     var infoboxOptions = {title:'Infobox Title', description:'Infobox description <a href="#test">Test</a> Link'}; 
     var defaultInfobox = new Microsoft.Maps.Infobox(map.getCenter(), infoboxOptions ); 
     map.entities.push(defaultInfobox);
    

    It actually doubles up the description, showing the first with link correctly and the second showing the < and > characters instead of rendering the HTML properly. I don't understand how this bug could be since when you set the HTML content of a div or some other element the web browser will just render it correctly. I can't believe this bug exists....

    I also tried placing <table> tags within the description to format some data to display and it doesn't even render it and shows < and > characters. This is ridiculous!!

    btw, I tested that this bug is an issue in IE9, IE9 Compatibility Mode, Firefox 4, Chrome 12 and Safari 5 for Windows. I would assume it affects all other browsers as well.


    Microsoft MVP - Bing Maps
    Blog: http://pietschsoft.com | Web.Maps.VE - ASP.NET AJAX Bing Maps Server Control
    Sunday, June 12, 2011 5:04 PM
  • The description property expect string input & it not meant for HTML contents. One can use htmlContent or setHTMLContent for HTML. Though I believe this could be handled better.


    HemantGoyal
    Monday, June 13, 2011 1:25 AM
  • The description property expect string input & it not meant for HTML contents. One can use htmlContent or setHTMLContent for HTML.

    The problem in that case is that htmlContent prevents from using action links last time I checked.

    However personally, I gave up on native infoboxes and use Qtip2 instead: HTML is not a problem, they look much nicer (and easier to customize when you want to go further), nicely animated and more importantly, the infobox opens at the right side (top/bottom right/left) depending  on the space available around the pushpin.

    Active Bing Maps programming community at StackOverflow:

    http://stackoverflow.com/questions/tagged/bing-maps

    Monday, June 13, 2011 1:36 AM
  • I figured out a hacky work around for the time being that will allow HTML content to be displayed within the Infobox Description.

    // Use this method to Show the Infobox and it will inject
    // the raw description into the Infobox display.
    function showInfobox(infobox){
      infobox.setOptions({ visible:true });
      infobox.cm1001_er_etr.descriptionNode.innerHTML = infobox.getDescription();
    }
    

    This is something that should be supported out of the box, but at least there's a hack now...


    Microsoft MVP - Bing Maps
    Blog: http://pietschsoft.com | Web.Maps.VE - ASP.NET AJAX Bing Maps Server Control
    Monday, June 13, 2011 7:32 PM
  • Hey Chris, I agree with you on the infobox and how it should support HTML content better. As a supported work around rather than a hack you can use the modular plugin I created here for custom infoboxes: http://www.bing.com/community/site_blogs/b/maps/archive/2011/06/07/developer-tip-modular-plug-in-for-customizable-infobox-control.aspx
    Windows Live Developer MVP - http://rbrundritt.wordpress.com | http://inknowledge.co.uk
    Wednesday, June 15, 2011 3:25 PM
    Moderator
  • Printing problem in IE9 only, not FF4

    Hi

    http://www.walkingclub.org.uk/book_3/walk_121/map.shtml

    This page has a map with OS Tiles, 2 x polylines, several markers.

    - It prints fine in FF 4

    - Printing goes badly wrong in IE9 (try print preview) - the map outline & polylines appear, the map tiles are in a small strip below.

    - resizing the map (on the webpage) as landscape or portrait doesn't help

    NB: many div's on the page have CSS set to display:none for printing - it should just display the map

    BUT

    http://www.walkingclub.org.uk/book_3/walk_121/index.shtml

    - this page with 4 smaller maps (and the same polylines and markers) prints OK in both

    - maybe the problem is only with larger maps that need to be resized??

    Thanks

    Andrew

     

     

     

     

    Saturday, June 18, 2011 4:14 PM
  • When Using Multiple PushPins with Hover InfoBox's, using the standard InfoBox'sworks perfectly especially as you can specify a zIndex...however

    The moment you start to use Custom InfoBox's zIndex doesnt work at all! no matter what you specify it doesnt change anything! both on the pushpin itself and the Infobox.

    Aside from that the InfoBox's should at least appear over the other existing PushPins but they don't.

    Once you have placed the InfoBox's on the page and you hover, all layout is fine (using htmlContent - H4 and P tag as example).
    If you move the map and hover again no matter what css you apply both are scrunched up together on one line in certain zoom levels.
    You have to zoom in and out for it to clear back to normal.

     

    So

    1: zIndex doesnt work. (HAVE TO USE CSS Z-INDEX to fix this.)

    2: Custom InfoBox's are not brought to the front on top of other PushPins.

    3: htmlContent shrinks to one line when you move the map on certain zoom levels


    RYA Dev
    Tuesday, June 21, 2011 9:00 AM
  • I am having an issue with the InfoBox click event not firing after it has been off the current map. In my example, when I click on the InfoBox once it zooms in as expected, then after zooming back out the click no longer responds. I have seen this in both Firefox 5 and IE8.

    Here is the code I am running:

     

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html>
     <head>
     <title></title>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    
     <script type="text/javascript" src="https://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0"></script>  
    <script type="text/javascript">
    var map = null; function GetMap() { // Initialize the map map = new Microsoft.Maps.Map(document.getElementById("myMap"), {credentials:"My Credentials"}); // Add an infobox to the map var box = new Microsoft.Maps.Infobox(new Microsoft.Maps.Location(20.9, -66.6), null); // Add a handler to the pushpin drag Microsoft.Maps.Events.addHandler(box, 'click', ChangeZoom); map.entities.push(box); } function ChangeZoom(e) { if (map.getZoom() == 10) map.setView({zoom: 2}); else map.setView({zoom: 10}); }
    </script>
    </head>
    <body onload="GetMap();">
    <div id='myMap' style="position:relative; width:400px; height:400px;">
    </div>
    </body>
    </html>
      Any suggestions or workarounds would be appreciated.

    Thanks!

    Seth



    Tuesday, July 12, 2011 2:03 PM
  • I could repro the bug, when the Infobox goes out of current view by 3/4 zoom levels while zooming in.  The click event works when the infobox remains in current view.

    The workaround could be to close the infobox & re-create the infobox on pushpin click or similar action.


    MSFT
    Hemant Goyal
    Tuesday, July 12, 2011 11:29 PM
  • Thanks for your quick reply. I was afraid that would be your solution. We have 50+ info boxes on the map, so iterating through each one every time the map changes won't really work. I think I can use pushpins for now until they get this bug fixed.
    Monday, July 18, 2011 2:32 PM
  • As of the latest update, version 7.0.20110803140223.39, tile layer opacity properties are being ignored. Tile layers are either on, or off.

    This is easy to verify on the iSDK: http://www.bingmapsportal.com/ISDK/AjaxV7#TileLayers2.


    twitter: @alastaira blog: http://alastaira.wordpress.com/
    Saturday, August 6, 2011 9:37 AM
    Moderator
  • I think I may have found a bug in the AJAX v7 control. 

     

    It seems that when you use `setView` to set a zoom like this:

    var targZoom = map.getTargetZoom();
    map.setView({'zoom': targZoom -1});
    

     

    that if the the value of `targZoom` is not a whole number, then it causes the browser to continually calculate layout and repaints (in Chrome and Safari at least - I used the Timeline tab in the web inspector to discover this) until the zoom is set back to a whole number.

    I fixed it by doing this:

     

    var targZoom = Math.round(map.getTargetZoom());
    map.setView({'zoom':targZoom - 1});

     

     

    Is this a known issue with v7? I can understand not wanting to check for this in `setView()`, but maybe mentioning it in the docs would be helpful.

     


    Monday, August 8, 2011 3:23 PM
  • We shipped a QFE last night that fixed this.

     

    CP

    MSFT

    Tuesday, August 9, 2011 2:44 PM
    Moderator
  • I'm still experiencing the "margin" bug as described previously - both #1 (with map deep in page) and #2 (with a margin). I have two test cases:

     

    1. http://iamjhammons.com/bing-margin-bug1.html

    2. http://iamjhammons.com/bing-margin-bug2.html

     

    Apparently these were reported as fixed, but in both cases, the map does not zoom properly and the map type dropdown is not positioned properly.

    Any ideas?

     

    Tuesday, August 16, 2011 6:14 PM
  • I'm still experiencing the "margin" bug as described previously - both #1 (with map deep in page) and #2 (with a margin). I have two test cases:

     

    1. http://iamjhammons.com/bing-margin-bug1.html

    2. http://iamjhammons.com/bing-margin-bug2.html

     

    Apparently these were reported as fixed, but in both cases, the map does not zoom properly and the map type dropdown is not positioned properly.

    Any ideas?

     

    Any word on this?
    Monday, August 22, 2011 4:23 PM
  • Trying to use setView while the map is moving does not work (It can be seen here http://www.bingmapsportal.com/ISDK/AjaxV7) Drag the map, and before the animation stops click on the "Map view (center, zoom)" under "Set map options". I've tried this on Chrome 10.0.648.204 and Firefox 3.6.21, in Ubuntu. I know that it's not a common case, but I've stumbled upon this today. Also, I wasn't able to find a way to know if the map is still or in movement to make some kind of condition based on that.
    Tuesday, September 6, 2011 2:15 PM
  • Yeah! i could repro the issue. Try using viewchangestart/viewchangeend to time the setview

    attachmapviewchangeend = Microsoft.Maps.Events.addHandler(map, 'viewchangeend', function(e)
    {
    map.setView({ zoom: 10, center: new Microsoft.Maps.Location(40.73, -73.98) })
    });

     


    MSFT
    Hemant Goyal
    Tuesday, September 6, 2011 4:20 PM
  • I'm still experiencing the "margin" bug as described previously - both #1 (with map deep in page) and #2 (with a margin). I have two test cases:

     

    1. http://iamjhammons.com/bing-margin-bug1.html

    2. http://iamjhammons.com/bing-margin-bug2.html

     

    Apparently these were reported as fixed, but in both cases, the map does not zoom properly and the map type dropdown is not positioned properly.

    Any ideas?

     

    Any word on this?
    Any ideas on this issue? Thanks!
    Tuesday, September 6, 2011 5:18 PM
  • @jasonbing - Thanks for reporting. These bugs were fixed in our earlier release but when reverted in previous release due to some regressions. Hopefully, these will fixed in next release...
    MSFT
    Hemant Goyal
    Wednesday, September 7, 2011 10:04 PM
  • Hemant - Thanks for response! I really appreciate it.
    Tuesday, September 13, 2011 1:12 PM
  • I believe this is a bug with version 7 of bing maps AJAX api (If it's not please help)... I use clustered entity collections (Two seperate collections actually, for 2 different types of points). Initially these points are loaded from a DB, then assigned into singlePinCallback, or, clusteredPinCallback depending on their proximity to each other.

    The problem is I want to dynamically show pins based on search criteria from that moment on. To do this, I make an AJAX call to a php file that will make a similar query to the database and then on "xmlhttp.readyState==4" I assign the values (from json) to new arrays which will be sent back to the callback functions. BUT (this is the part that is not working...)  after I build my arrays, I call "map.entities.clear;" (I have also tried "map.entities.clear();"). "map" is the variable name I assigned to the Microsoft.Maps.Map object initially.

    Strangely this call DOES appear to remove the points from the map but as soon as I scroll(zoom) in or out, ALL of the original points seem to come back. Any ideas why this is happening?

    Wednesday, September 14, 2011 10:35 PM
  • clear() is a method, so you want to state the double brackets after it, and it should remove all entities of the map. I can't quite follow the rest of the behaviour you're describing - are you saying that, instead or removing the items from the map, clear() is just temporarily hiding them? That doesn't sound right.

    Any chance of you posting a URL to a map that demonstrates the problem?


    twitter: @alastaira blog: http://alastaira.wordpress.com/
    Thursday, September 15, 2011 8:30 AM
    Moderator
  • This is a security certificate bug that applies to V7.  Please note this is NOT related to the incorrect URL problem cited multiple times in this thread already.  The URL I'm loading is https://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0&s=1

    When loading this in Firefox 3.6, it throws a security error "sec_error_unknown_issuer" with the technical details stating "ecn.dev.virtualearth.net uses an invalid security certificate.  The certificate is not trusted because no issuer chain was provided."

    This only happens in certain versions of firefox.  When I use a browser that does not throw this error, I watch all the file GET requests and they are all calling virtualearth.net properly using https:// so I know the URL is correct.

    Here is an illustration of loading up the main script file directly over SSL:

    According to a variety of documents I've read (example from comodo: https://support.comodo.com/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=1249 ) "This Firefox error means that Firefox is unable to chain up to a trusted Certificate Authority based on information provided to Firefox from the web site you're visiting. If you're the owner or maintainer of the site in question please install the Intermediates that came with your certificate. This is required as per the SSL/TLS RFC starting with RFC 2246, which covers TLS 1.0."

    They go on to say:

    RFC 2246 states:
    This is a sequence (chain) of X.509v3 certificates. The sender's certificate must come first in the list. Each following certificate must directly certify the one preceding it. Because certificate validation requires that root keys be distributed independently, the self-signed certificate which specifies the root certificate authority may optionally be omitted from the chain, under the assumption that the remote end must already possess it in order to validate it in any case.

    This translates to: The Web Server must present the full certificate chain (if it has one), so that unaware clients can chain up properly to the appropriate Root CA."

    EDIT:  this appears to have been a known issue with a "priority 1" at Microsoft over a year ago, but doesn't seem to have been resolved:  http://social.msdn.microsoft.com/Forums/en-US/vemapcontroldev/thread/b785d342-a2da-4d0c-aa45-be8190875d69/

    EDIT 2: I've been seeing other examples of this specific error in Firefox, and the solution seems to always be simply installing the intermediate certificates.  The source could be as simple as the ecn.dev.virtualearth.net certificates being only partially installed, omitting the intermediate cert installation.

    Please let me know if this is really a known error, if anything is being done to fix it, when it might be fixed, and if there is any kind of a work around available.

    Thanks in advance!

     



    • Edited by JasonWGreen Monday, September 26, 2011 11:31 PM even more information
    Monday, September 26, 2011 11:12 PM
  • Monday, November 14, 2011 8:55 AM
  • !!! The map control is sluggish and eventually locks up when working with a map that has a polygon on it. The more verticies the worse the problem. We have confirmed this to be a problem with IE8 and IE7. IE9, FF and Chrome are not affected. Both filled and non-filled polys are a problem.
    Our customers began reporting the issue this morning. Did a change go in last night?
    This behavior can be easily recreated using the iSDK, http://www.bingmapsportal.com/isdk/ajaxv7#Shapes8
     
    Open the Shapes > Polygon custom sample and paste in this code. It is a blue-shaded poly covering Long Island. Pan to New York and zoom in and pan around, zoom in to the bottom 3 zoom levels and the panning will slow and eventually the browser will lock up.
    Probably the quickest way to get into this mode is to have the map in Auto mode, zoom to the tightest zoom and then switch to Road mode. The poly must be in the map view to recreate the problem.
     
    map.entities.clear();
    latlon = map.getCenter();
    var polygon = new Microsoft.Maps.Polygon(new Array(new Microsoft.Maps.Location(40.4908654,-74.2541691),new Microsoft.Maps.Location(40.6098215,-73.1884953),new Microsoft.Maps.Location(41.0628249,-71.7904851),new Microsoft.Maps.Location(41.2241563,-72.191486),new Microsoft.Maps.Location(41.006887,-72.7050969),new Microsoft.Maps.Location(40.9820104,-73.1472966),new Microsoft.Maps.Location(40.9550502,-73.5263249),new Microsoft.Maps.Location(40.919778,-73.7158391),new Microsoft.Maps.Location(40.9571245,-73.9053532),new Microsoft.Maps.Location(40.7535381,-74.0207097),new Microsoft.Maps.Location(40.6785942,-74.0536687),new Microsoft.Maps.Location(40.6910907,-74.1195866),new Microsoft.Maps.Location(40.6410906,-74.2074773),new Microsoft.Maps.Location(40.5493264,-74.2569157),new Microsoft.Maps.Location(40.4908654,-74.2541691)),{fillColor: new Microsoft.Maps.Color(50,0,0,255), strokeColor: new Microsoft.Maps.Color(150,0,0,255),strokeThickness: 1.5});
    map.setView( {zoom:10});
    map.entities.push(polygon);

    Friday, November 18, 2011 12:40 AM
  • There is no change since 11/05 in mapcontrol API's & it should work as expected. I tried to repro your sample on IE7/8 but no repro for me. The polygon rendering becomes slow while adding large data sets but with your sample data set it should work fine.
    MSFT
    Hemant Goyal
    • Edited by Hemant Goyal Friday, November 18, 2011 2:08 AM Edited typo
    Friday, November 18, 2011 2:00 AM
  • Could you please verify that you tried this step and that the browser does not become unresponsive?

    "Probably the quickest way to get into this mode is to have the map in Auto mode, zoom to the tightest zoom and then switch to Road mode. The poly must be in the map view to recreate the problem."

    Thanks

     

    Friday, November 18, 2011 7:58 AM
  • I tried your steps earlier as well, after multiple tries I could see browser(IE8) became unresponsive for a short span (2-3 sec) & then again it start working fine. As intimated earlier, there is no recent change around this polygons. we have shapes optimization tasks in our future release which will probably fix this issue.   

    Thanks for reporting the issue.


    MSFT
    Hemant Goyal
    Friday, November 18, 2011 5:19 PM
  • I started a new post about an issue I am seeing with TileLayers here: http://social.msdn.microsoft.com/Forums/en-AU/vemapcontroldev/thread/de834a5d-4eaa-4779-9739-9b161640a6d9, but thought I might get an answer/fix faster if I posted here.
    Wednesday, November 30, 2011 12:53 AM
  • I started a post on another thread, but HTML elements (buttons, links, etc) inside of infoboxes created with the setHtmlContent are not clickable in any other browser except IE.

    http://social.msdn.microsoft.com/Forums/en-US/vemapcontroldev/thread/0c22d559-0779-4d27-9e0c-c43b0e032ff5

    Friday, December 9, 2011 4:40 PM
  • Pinch-to-zoom on iOS (both 4.3 and 5.0, haven't tested previous versions) on the iPhone and iPad is broken when using custom tile layers. You can try it on the Bing Maps Portal ISDK (http://www.bingmapsportal.com/ISDK/AjaxV7#TileLayers2), the NPS TileStream layer example (http://maps.nps.gov/support/examples/bing-tilestream.html) and any other examples. As soon as you do the pinch to zoom gesture (either in or out) the map freezes and loses interaction with the user. Same thing happens when using the onscreen zoom controls (sliders). It appears that as soon as the zoom level has to change, the map freezes. It doesn't occur however when using double-tap to zoom.

    Best,

    Tuesday, December 13, 2011 4:12 AM