I have a geography field in sql server. I need to extract the latitude longitude from it to display. Any suggestions on how to accomplish this? It looks like my smartobject has it mapped to a "memo" type. I'm developing this using k2 for visual studio 2012.
Page 1 / 1
One of the simplest ways to do this would be to split the string. In my test, the field was returned in the following format:
POINT (-122.36 47.656 -122.343 47.656)
So a simple split would get you both. If this is something that you will use frequently, create a simple Inline function to do this for you:
http://help.k2.com/en/K2DevRef1420.aspx?page=how_to_create_a_custom_inline_function.html
I ended up making a stored proc to return the lat and long from the fields. With the geography data type it wasn't stored as a string for me to split.
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.