Input Mask for Latitude, Longitude

3 posts, 0 answers
  1. Reid
    Reid avatar
    325 posts
    Member since:
    Oct 2008

    Posted 23 Jun 2011 Link to this post


    Does someone have a working Mask for inputting a Longitude and Latitude that can be used for the RadMaskedTextBox?
    If you could share it I would appreciated it.

    I have tried "0000\.0000000" which does not work. 

    I also tried "####.######" or "0000.000000".  These work in general and allow the minus sign for negative values but does not align the value to the left of the decimal point correctly.  You can enter a value to the left of the decimal that only has two digits, in other words the mask allows for empty spaces.   I need to make sure the digits to the left of the decimal right align.

  2. Alex Fidanov
    Alex Fidanov avatar
    637 posts

    Posted 29 Jun 2011 Link to this post

    Hello Reid,

    I am not sure you will be able to achieve this using the standard (text) mask. String values are always left to right aligned so you would need a numeric mask. For the RadMaskedTextBox you can use a mask like n5, allowing 5 digits after the decimal point. To restrict the digits begore the decimal point, you would have to handle the ValueChanging event and Handle it appropriately.

    You can also try the RadMaskedNumericInput, with a mask of #4.5. To make it behave and look like the scenario you are trying to achieve, you can set the following properties as well :


    Please let me know if you have questions on this.

    Alex Fidanov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Reid
    Reid avatar
    325 posts
    Member since:
    Oct 2008

    Posted 29 Jun 2011 Link to this post

    Hello Alex,

    Thank you for the detailed response.  I put in place everything and it seems to work for positive numbers.  If this UI concept of allowing the input of raw long/lat values stays in place I think there needs to be the ability to enter negative numbers. 

    But with further consideration I need to re-think this piece and just cache the locations and present them in text form in a drop down. This app is an application for a driver so punching in precise long/lat should not be needed.

    Thank you for your help.

Back to Top