Getting "precise" coordinates within NAV 2016

barandeniz
Member Posts: 44
Hi, for a customer, we did a development which saves users current location to a record so after some time user can see the records location. But the problem is when we take coords from nav, they are not precise. When user takes the location from WhatsApp, the location (coords) are much more precise. How can make NAV use High Accuracy options? Which C/AL code do i need to put there so NAV will use High Accuracy ??
0
Answers
-
To store coordinate values, set table field property "Data Type" to decimal.
Also set table field property "DecimalPlaces" to 0:18. You should now be able to enter and view floating point values in high accuracy.
The problem seems to be, when you retrieve the value (per web service, i assume).
NAV will eventually use the default accuracy of 0:2 or 0:5. With the settings above this will be fixed.
Oki0 -
To store coordinate values, set table field property "Data Type" to decimal.
Also set table field property "DecimalPlaces" to 0:18. You should now be able to enter and view floating point values in high accuracy.
The problem seems to be, when you retrieve the value (per web service, i assume).
NAV will eventually use the default accuracy of 0:2 or 0:5. With the settings above this will be fixed.
Oki
I set the Data Type to Text so there is no decimalplace restiriction.
https://msdn.microsoft.com/en-us/library/mt574342(v=nav.90).aspx
There are 3 options for Location Automation thing. But i can not find how and where to use these options. I think my problem will be solved if i use these options with right way.0 -
Up..0
-
Up...0
-
Hi,
as I wrote before, set the data type to decimal. If you set it to text, a conversion will take place at the time you assign the coordinate value to the text field.
If you want to really rely on the text type, you can format the assignment yourself:
TextLatitude := FORMAT( Location.Coordinate.Latitude,0,'<Precision,0:18><Standard Format,0>');
I highly recommend you to use the decimal type, which has always the best precision and is not depending on localized formats (decimal separator,thousand separator)
Oki1
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions