none
Global Margin / Padding broke everything

    Question

  • Hello.

    Just realized that if your map, with pushpin and possibility to click on it is on page, and this page have margin or padding - I mean global for HTML tag - then click area for pushpin will be off actually pushpin. Here is your example - https://msdn.microsoft.com/en-us/library/mt750265.aspx - I copied all things and just add there padding-top: 30px for HTML tag - https://codepen.io/AlexeyTheDeveloper/pen/Krqrez - http://prntscr.com/lj4xoc - and you can see as a result - that click area are off pushpin for 30px - just try to point into it - it will be somewhere here http://prntscr.com/lj4y2n . I tried to remove those paddings from my html before add pushpins, and add them right after - not working. Work only if I will:

    1. Remove padding

    2. Add my pushpins

    3. Bring my required padding back - but with delay around 1-5 seconds. If I will bring it back without delay, or with 500ms delay - it will be still off.

    I think this is because on your side your scripts require time to analyze icons size - to build their click areas. But this is broke whole thing for me and other users: it's coming from WordPress admin area - where WordPress add those padding - http://prntscr.com/lj4zhz . So this is really important - because I want to develop Bing Maps plugin for you and put it into WordPress. Any suggestions?

    Friday, November 16, 2018 12:54 PM

All replies

  • Hi Alexey,

    Can you provide the Margin Setting call that you are seeing shift the push pins?

    Sincerely,

    IoTGirl

    Monday, November 19, 2018 9:52 PM
    Owner
  • Hello.

    I don't really understand you. Here is example with described bug - https://codepen.io/AlexeyTheDeveloper/pen/Krqrez - you can see it there http://prntscr.com/llz8xd . "Margin Setting call" - is a CSS rule "margin-top: 30px" - any number of pixels will show you issue, it's also in my example. There are links in both my messages - check them out  - and you will see issue (your forum does not allow me to make them as normal linkdespite I already verified my account).

    Friday, November 23, 2018 10:50 AM
  • So, any news regarding this issue?
    Wednesday, December 5, 2018 7:11 PM