The sample works fine for me [VS2008]but for some reason when I add the code to my own project [VS2010] I get an error when I hover over the menu item that contains the the sub menus.
Have spent a good while at it so far and I'm kinda lost as to what I have done wrong
In the page load I have the attached code which is the same as the demo
ContextMenu menuOnMap = new ContextMenu("area", 180); ContextMenuItem redirectItem = new ContextMenuItem("<a href='thinkgeo.com' target='_blank'>ThinkGeo<a>"); ContextMenuItem InfomationItem = new ContextMenuItem("Menu item"); menuOnMap.MenuItems.Add(redirectItem); ContextMenuItem subItem = new ContextMenuItem("sub menu"); redirectItem.MenuItems.Add(subItem); menuOnMap.MenuItems.Add(InfomationItem); Map1.ContextMenu = menuOnMap;
, however I get an Object required error when I hover over the item that contains the sub menu.
subContextMenu.mapUniqueID is undefined
[See attached document]
I have tested it in IE8 and Firefox.
I'm on XP and using VS2010 with V 4.5.0.0 of MapSuite.
I have tried to use the same code with yours, but I don’t find any problems about it. Please get the latest Daily Build (4.5.15.0 or later) through helpdesk.thinkgeo.com/helpdesk/login.aspx. If you still have issues then please provide us the sample project for us to re-product it.
Thanks for the codes and screenshot you have provided for this problem.
This issue does exist, but we have fixed this issue and it should be available in the latest Daily Build (4.5.17.0 or later). Please get it through helpdesk.thinkgeo.com/helpdesk/login.aspx.
4.5.16 seems to be the lastest version available in the Daily Dev or Production build. [WebEditionEvaluation4.5.16.0DllPackage.zip ] 4.5.17 is not available. I will keep an eye on it and download 4.5.17 when available
Hi, Liam Sorry for that. I forgot to remind you what I mean is the development daily builds. In a couple of weeks ago, the bug fixes also had been included in the development daily builds. Meanwhile, these builds also contains new features and functionality. Thanks, Khalil
I'm unsure what you mean in the above explaination. How often are the daily dev and production builds synched with each other. I'm aware that there was a recent general release [4.5].
i.e. when will the recent change for the sub menu be migrated across to the production build.
Hi, Liam In fact, we don’t synchronize the daily development and production builds before the version of 4.5.17.0, but we only include the bug fixes and new features or functionality in the Daily Development builds. From the version of 4.5.17.0 on, and we will include bug fixes in the two builds, and the development builds also include new features. The recent change for the sub menu problem will be migrated across to production build in the next release. Also you can get full detailed information from our wiki stuff. wiki.thinkgeo.com/wiki/Map_S...ilds_Guide Thanks, Khalil
I have another context menu issue in both Firefox and IE8.
At high zoom levels the context menu disappears immediately after a brief appearance. When you zoom in further it works fine.
Please see the attached sample - if you zoom out to the furtest extent the context menu disappears almost immediatly and as you zoom in further it still exibits the same behavour untill you are zoomed into about half way on the zoom scale.
This issue does not seem to occur when using the WorldMap Kit but does occur when using the Google maps layer.
With the Google Maps layer the menu problem only actually occurs when sample markers are added.
I'm using 4.5.17.0 from the development daily build.
Can you have a look at this.
I have recorded the behavour and have emailed the video to support
There is also an intermittent error captured in the video also which appears for time to time. Can you check if it can be reproduced with the attached project.
Hi, Liam Thanks for your video and sample codes. We can reproduce the problem easily. Here is one quick fix for that. Setting the AutoPan property as false. liftOverlay.ZoomLevelSet.ZoomLevel01.DefaultMarkerStyle.Popup.AutoPan = false; If you set it as true, and we will pan the map in order to include the all popups. But there is one bug for that, and it will cause the recursive call of Pan Method that leads to the issues. As for your another issues about “appears 1/2 screen away from where the right click occurred”, and I don’t understand what your meaning. Can you clarify it for use more clearly? Thanks, Khalil
Thanks for that, the issue is fixed on the sample project and on our main project.
Do you have a timeline for this bug fix.
On our main project the issue that I discussed has got worse, i.e. with the context menu appearing at a different location than where the right click occurred.
I have attached a image to clarify.
I have right clicked on the bottom of the map [around Spain] and the context emu has appeared off the map completely.
This issue is in IE8 and Firefox but I cannot reproduce in the sample which is frustrating.
The code base in the sample is similiar to our main project code base although the main project has the map contained in a user control if that makes a difference
Hi, Liam Ok, I got your problem. I can reproduce it in your previous attached sample of “ContextMenuSample2.zip”. The issue is caused by the position setting of your web page not related with other things. Here are two solutions for you. 1. One is to add the missing closing div tag which has the class of “header”, please see the screenshot below. 2. Another one is to remove the position CSS style for header class in the Site.css file, which doesn’t make sense for it.
As for the previous issue, that’s not a bug, at least we don’t consider it as bug. But we are considering giving users a workaround for it. Any progress on it we will let you know first. Hope it could help you. If you have additional questions please let us know. Thanks, Khalil
I have returned to this issue [eventually!] and the issue is still there so I'm going to try and force the Vertical postion of the context menu. The horizontal position does not suffer from the issue above.
I'm already saving the right click location for another purpose and just need to extend this to ensure that the context menu appears in the correct location
<code="script"> function OnMapCreated(Map1) { Map1.events.register('mousedown', Map1, function (evt) { if (evt && evt.button == 2) { rightClickCurrentLocation.X = evt.xy.x; rightClickCurrentLocation.Y = evt.xy.y; }