resize/padding pushpin detail

Is it possible to resize the the pushpin detail window I know you can add a control and make it whatever size you want but I would like to keep the arrow VE produces for the window. Also, is there any way to reduce the padding in the detail window Seems like the way it is now is that there is alot of wasted space that is not necessary if you don't have alot of info in the window.

Thanks,
Jason



Answer this question

resize/padding pushpin detail

  • --Alan---

    hi john,

    hope u didn't see my last post ... i have solved my problem with ur script .. thank u ...

    yuki

  • Klaus Löffelmann

    Got it working in both IE and FF. Firebug showed that I had that line of code in the wrong place.

    Thanks for the help guys, Bill


  • GBC143

    John,
    This is exactly what I need to display small pictures in my map project. The only problem is that it displays great in IE but doesn't seem to have any effect in Firefox. Is there a fix for this

    Bill

  • DarkFire2

    Sure here you go:

    <html>
    <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <script src="
    http://dev.virtualearth.net/mapcontrol/v3/mapcontrol.js"></script>
    <style type="text/css">
    .ero .ero-body {width: 400px;}
    </style>
    <script>
    var map = null;
    var pinID = 1;

    function GetMap()
    {
    map = new VEMap('myMap');
    map.LoadMap();
    }

    function AddPin()
    {
    var pin = new VEPushpin(
    pinID,
    map.GetCenter(),
    null,
    'My pushpin',
    'This is pushpin number '+pinID
    );
    map.AddPushpin(pin);
    pinID++;
    }
    </script>
    </head>
    <body onload="GetMap();">
    <div id='myMap' style="position:relative; width:400px; height:400px;"></div>
    <a href="#" onclick="AddPin();">Add a pushpin to the center of the map</a>
    </body>
    </html>

    John.



  • Shuggi_e

    Jason,
    I had the exact same problem, well i needed more width.
    I put up an article that shows the html rendered by VE and the default css.
    You would simply overwrite all the padding styles and reduce the overall width
    Have a look at:
    http://www.soulsolutions.com.au/Articles/VirtualEarthPopupStyles/tabid/79/Default.aspx
    John.


  • Greekmaz

    Hi, being not quite an HTML developer, I am not too sure how to achieve the "To change the width you simply put the line of code in your css ensuring your css is referenced after the VE control" goal. Can I get a concrete example Thanks very much.

    Gordon


  • Rudolf_E

    hello ...

    i have also got the problem with the size of the pushpin detail box .. and i went to the link u post, but i dunt know how to apply these style to the pushpin .. do u use mouseoverCallBack function , if yes how do u hide the box when mouse out the pin

    Thank u

  • pcompassion

    I have GeoRss feed that in <description> tag contains CDATA that has <IMG>. They display just fine. Try it this way. Also I had <script> eval('xxx');</scripts>

    added to desctiptions in every item of GeoRss and it works only in FF not in IE.

    Anyone know where we can find solid docs on the entire window.ero stuff it is totally hacks and tricks .



  • Edmund Jones

    This is the type of stuff SDK should also contain. Anyone at MS rreading this

    We need that kind of tinkering in SDK presented.



  • guilhermecvm94558

    Ok i see what you are getting at. The code shown is what is generated by the default VE pushpin rollover. For most situations you simply want to overwrite some style properties. You could also completly replace the pushpin popup with your own custom popup, which is what your asking. I did not explain that in this article.
    My preference is to modify the existing popup as all the hard work of positioning etc has been done for you. I simply ignore the title and use the description to make a nice layout.
    To change the width you simply put the line of code in your css ensuring your css is referenced after the VE control.

    There are many other threads in this forum about creating your own custom popup from scratch.


    John.



  • ttfo

    Got it working in both IE and FF. Firebug showed that I had the line of code in the wrong place.


    Thanks for the help guys, Bill


  • None Gave

    Thanks. It works perfectly.
  • Matt75

    No thats just me Tom

    The issue with firefox is that the css from VE get added after the "fix" bascially making it useless (overwrites it). I recommend Firebug to see exactly what is going on. You may need to add the css on the html page itself after the js include for VE.

    John.



  • resize/padding pushpin detail