locked
Disable infoboxes RRS feed

  • Question

  • Is there any method how to stop infoboxes from showing?. I do not want any infoboxes to be shown when moving mouse over a pushpin.

    Thursday, October 18, 2007 7:52 AM

Answers

  • Some of you might be interested to know. In v6, if the title and description is a empty string or not set(default), the infobox for that shape(pushpin/polygon/polyline) will not be shown.

     

    This will be easier for you to turn off individual shape's infobox.

    Friday, October 19, 2007 5:18 PM

All replies

  • In your loadmap function attach to the mouseover event:

     

    map.AttachEvent("onmouseover", onMapMouseOver);

     

    then add the handler to cancel the event:

     

    Code Block
    function onMapMouseOver(e) {
        if (e.elementID){
            return true;
        }
    }

     

     

     

    the e.elementID is only valid for shapes.

     

    John.

    Thursday, October 18, 2007 9:48 AM
    Moderator
  • Thx

     

    I have added the following

     

    map.ClearInfoBoxStyles();

     

    and it seems that this method disables the info boxstyles too.

    Thursday, October 18, 2007 9:52 AM
  • Really? ClearInfoBoxStyles() should only clear out the default css styles.

     

    Thursday, October 18, 2007 2:56 PM
    Moderator
  • Some of you might be interested to know. In v6, if the title and description is a empty string or not set(default), the infobox for that shape(pushpin/polygon/polyline) will not be shown.

     

    This will be easier for you to turn off individual shape's infobox.

    Friday, October 19, 2007 5:18 PM
  • Great enhancement! Much easier for people to control. So to summerise if you don't want an infobox to show simple don't populate the title and description. If you cannot control the content (maybe data loads from external data source like geoRSS) then use the code snippet above.

    John.

     

    Friday, October 19, 2007 11:51 PM
    Moderator
  • Don't add SetTitle and SetDescription with shape.

            /* shape.SetTitle('Title');
             shape.SetDescription('Description');*/
    Friday, September 4, 2009 11:10 AM
  • Deleted
    Friday, July 23, 2010 6:55 PM
  • VEPushpin.ShowDetailOnMouseOver = false;

    works for us,

    C

     

     

     

     

    Sunday, July 25, 2010 9:56 PM
  • @jbfasulo - you're having problems disabling infoboxes in the Silverlight control? You shouldn't be getting any infoboxes unless you manually added them via the ToolTipService class anyway. Can you start a new thread and post your code there please?

    @grubnow - the VEPushpin class (and the ShowDetailOnMouseOver() method) were deprecated following version 5, about three years ago. The functionality is replaced by the onmouseover event demonstrated by John in post #2


    Beginning Spatial with SQL Server http://www.apress.com/book/view/1430218290
    Monday, July 26, 2010 6:56 AM
    Moderator