none
Polygon mouse events are not working on IE11, but working fine any other browers and IE 10 even Alert me RRS feed

  • Question

  • I know i have posted in General, i am posting here again to get some help.

    this is my code, I have been working on this project more than 1 year and It is out to public and working fine with other browers which polygon events got changed lately strange way such as mouse event are not working on polygon itself

    and events are working on lines even if it is polygon. I hope this will be fixed soon and In IE 11, it sin't responding any of mouse events which all other browsers are responding such as chrome,firefox and safari. IE10 is working as well. you see my points here... IE 10 is working like others. please let me know what's going on. thanks you

    $.each(obj,function(i,v){
    							
    	var l1 = new Microsoft.Maps.Location(v.tlat,v.tlon);
    	var l2 = new Microsoft.Maps.Location(v.tlat,v.blon);
    	var l3 = new Microsoft.Maps.Location(v.blat,v.blon);
    	var l4 = new Microsoft.Maps.Location(v.blat,v.tlon);
    	var vertices = new Array(l1,l2,l3,l4,l1);
    	parcel= new Microsoft.Maps.Polygon(vertices,_options);
    					
    	map.event_Handle(parcel,v);
    							
    });
    
    event_Handle:function (land_mark,v){
    				
    	map.landarray.push(land_mark); // landarray is collection
    	var latlng=new Microsoft.Maps.Location(v.blat,v.tlon);
    	Microsoft.Maps.Events.addHandler(land_mark, 'mouseover', function(e){
    		map.displayName('LandKey :'+v.land_key,latlng);
    	});	
    	 Microsoft.Maps.Events.addHandler(land_mark, 'mouseout',function(e){
    		$("#map_canvas #tooltip").remove();
    	});	
    			
    },

    Friday, March 7, 2014 5:44 AM

Answers

  • This is a known issue. There are two things worth trying to resolve this. The first is to set the map mode such that all the polygons are drawing in the same layer. This can be done by adding the following code after loading the map:

    map.getMode().setOptions({ drawShapesInSingleLayer : true });

    If you still find you are having issues I came up with a work around that seems to do the trick. Add the following CSS style to your page:

    <style>
    .MicrosoftMapDrawing{
     pointer-events: auto !important;
    }
    </style>


    http://rbrundritt.wordpress.com

    • Proposed as answer by Ricky_Brundritt Friday, March 7, 2014 3:08 PM
    • Marked as answer by zon-ze.com Friday, March 7, 2014 3:36 PM
    Friday, March 7, 2014 3:07 PM

All replies

  • hi, first part of problem i solved but i couldn't solved other part which is IE11 mouse events not working..

    I have created a map to test but IE still failed for the mouse events.

    how to solved my problem?

    It was actually my css file which overwrite bingmap css.

    took a while to figure..

    remember bing map use svg and path, and etc, if you use any svg, it can over write.

    Friday, March 7, 2014 8:59 AM
  • This is a known issue. There are two things worth trying to resolve this. The first is to set the map mode such that all the polygons are drawing in the same layer. This can be done by adding the following code after loading the map:

    map.getMode().setOptions({ drawShapesInSingleLayer : true });

    If you still find you are having issues I came up with a work around that seems to do the trick. Add the following CSS style to your page:

    <style>
    .MicrosoftMapDrawing{
     pointer-events: auto !important;
    }
    </style>


    http://rbrundritt.wordpress.com

    • Proposed as answer by Ricky_Brundritt Friday, March 7, 2014 3:08 PM
    • Marked as answer by zon-ze.com Friday, March 7, 2014 3:36 PM
    Friday, March 7, 2014 3:07 PM
  • thank you so much that fixed my problem, 

    <style>
    .MicrosoftMapDrawing{
     pointer-events: auto !important;
    }
    </style>

    the first one i already tried long before.

    2nd one wasn't. I couldnt even find one like that out there.

    thank you very much

    Friday, March 7, 2014 3:37 PM