none
Bug: Pushpin Title Color Conflict With CanvasDark RRS feed

  • Question

  • Is there any way to override the pushpin title color?

    When viewing a pushpin withe a title using most map types, it displays using a white color (which is fine), however, when using map type CanvasDark, the title does not render in a way that is readable.

    Example with Aerial map type:

    (cannot add image yet because account not verified, the text is white)

    Example with CanvasDark map type: (it is unreadable during normal map viewing conditions)

    (cannot add image yet because account not verified, the text is gray with a white border)

    I know I could add a 'text' element to the generated svg for the pushpin, but then I would lose the collision detection features currently enabled for the title text.  If there is no way to override the styling of the pushpin title, is it possible to have this bug fixed?

    Sunday, March 8, 2020 10:33 AM

Answers

  • Hi Kenneth,

    The fix is now in production so you should be able to get the fixed label experience now.

    Sincerely,

    IoTGirl

    Friday, May 29, 2020 9:12 PM
    Owner

All replies

  • Hi Kenneth,

    I have been able to reproduce your issue with our interactive SDK.  Please go to https://www.bing.com/api/maps/sdk/mapcontrol/isdk/pushpinlabels and paste the code from https://www.bing.com/api/maps/sdk/mapcontrol/isdk/canvasdarkmaptype and press the run button

    the code should look like this when you are done

    var map = new Microsoft.Maps.Map(document.getElementById('myMap'), {
        /* No need to set credentials if already passed in URL */
        mapTypeId: Microsoft.Maps.MapTypeId.canvasDark,
        supportedMapTypes: [Microsoft.Maps.MapTypeId.road, Microsoft.Maps.MapTypeId.aerial, Microsoft.Maps.MapTypeId.canvasDark]
    });
    var pushpin = new Microsoft.Maps.Pushpin(map.getCenter(), { text: 'A', title: 'Title', subTitle: 'Subtitle' });
    map.entities.push(pushpin);

    I will report this issue to the team.

    Sincerely,

    IoTGirl

    Monday, March 9, 2020 3:55 PM
    Owner
  • Perfect, that captures the exact use case.  Thanks!
    Monday, March 9, 2020 10:12 PM
  • I have already heard back from the V8 team and they will be reviewing the issue this week.  My recommendation was that "Default" should use whatever theme coloring is set for the control at that time.  In the meantime, have you taken a look at our style sheet editor?  You can also create your own theme rather than using the built in ones. 

    https://blogs.bing.com/maps/2019-02/add-custom-styling-and-sparkle-with-map-style-sheet-editor

    Please do note that the team works on an AGILE schedule so I will not be able to provide you a timeline for resolution.


    Monday, March 9, 2020 10:53 PM
    Owner
  • I was looking into this before posting and could not find a property that would modify the pushpin title styling, but I may have missed it.  I will download the style editor and try that.
    Thursday, March 12, 2020 8:16 AM
  • Hi Kenneth,

    There may not be one but you could potentially create a theme in the meantime that meets your need and is readable with the default.

    Honestly I think the bug is that this text is not respecting the current theme.

    Sincerely,

    IoTGirl

    Thursday, March 12, 2020 2:53 PM
    Owner
  • Hi Kenneth,

    The team says the fix for this has been deployed. Can you confirm?

    Sincerely,

    IoTGirl

    Tuesday, March 24, 2020 9:57 PM
    Owner
  • It appears to be working except for one case: When the map is initialized with CanvasDark as the map style.

    When the map is initialized with another type then changed to CanvasDark, it works fine.  However, when the map is first created with CanvasDark, the previous condition still exists.  This is reproducible from the interactive SDK example you gave in a previous reply.

    But the text looks much better and more readable now! Thanks!

    Edit: After playing with the changes more, it seems to be honored in some cases.  When changing the map style to CanvasDark, the new style is honored.  However, in some cases, when changing position (especially when panning to a location not previously visible on the map with a pushpin) or changing zoom level, about half the time it would render fine and the other half it would render with the dark text and white outline.

    Are the changes pushed to the stable branch or do I need to specify the experimental branch when loading the map?



    Wednesday, March 25, 2020 10:11 AM
  • Hi Kenneth,

    Thanks for checking and indeed, some of the fix is delayed.  I am hoping that the full fix will be in this month's release of the control but I had the same experience you did and it seems there is one component of the fix that needs the full deploy of the control update.

    Sincerely,

    IoTGirl

    Wednesday, March 25, 2020 8:30 PM
    Owner
  • Hi Kenneth,

    The fix is now in production so you should be able to get the fixed label experience now.

    Sincerely,

    IoTGirl

    Friday, May 29, 2020 9:12 PM
    Owner
  • Confirmed!  I see the changes and seem to be reflected in the various use-cases above.

    Thanks!

    Ken

    Saturday, May 30, 2020 3:57 PM
  • Excellent!  Thank you for your confirmation.
    Sunday, May 31, 2020 8:19 PM
    Owner