none
Static Map - plus sign (+) of pushpin label in url ? RRS feed

  • Question

  • How can

    I get a plus sign (+) of pushpin label in the url of a static map ?
    If I put a+ in the label, only the "a" character appears.
    If I put the hexadecimal format (%2B), there's an error.

    There's no specification in the documentation : http://msdn.microsoft.com/en-us/library/ff701719.aspx

    My url is in this format : http://dev.virtualearth.net/REST/v1/Imagery/Map/Road/43.7,7/15?pp=43.70114,7.0021;;a&key=BingMapsKey

    • Moved by Ricky_Brundritt Friday, March 9, 2012 5:17 PM (From:Bing Maps: Map Control and Web services Development)
    Wednesday, April 20, 2011 12:47 PM

Answers

  • I've been trying this myself and can confirm the problem, although I'm afraid I don't have a solution.

    The reason why hex escaping doesn't work is because the label field is limited to 2 characters in length. This length appears to be evaluated and checked before any url decoding, so %2B = 3 characters long, causing the error (you'll get an error if you specify any label greater than 2 characters in length). The plus character itself seems to be reserved, so I'm afraid there may be no solution. Do you really need a + ?


    twitter: @alastaira blog: http://alastaira.wordpress.com/
    • Marked as answer by CartoWeb Thursday, April 28, 2011 10:03 AM
    Wednesday, April 20, 2011 6:42 PM
    Moderator

All replies

  • I've been trying this myself and can confirm the problem, although I'm afraid I don't have a solution.

    The reason why hex escaping doesn't work is because the label field is limited to 2 characters in length. This length appears to be evaluated and checked before any url decoding, so %2B = 3 characters long, causing the error (you'll get an error if you specify any label greater than 2 characters in length). The plus character itself seems to be reserved, so I'm afraid there may be no solution. Do you really need a + ?


    twitter: @alastaira blog: http://alastaira.wordpress.com/
    • Marked as answer by CartoWeb Thursday, April 28, 2011 10:03 AM
    Wednesday, April 20, 2011 6:42 PM
    Moderator
  • No, I have used an other character (*).
    Thank you

    Thursday, April 28, 2011 10:03 AM