# Latitude and longitude

**URL:** <https://forum.inductiveautomation.com/t/latitude-and-longitude/82524>\
**Category:** Ignition\
**Tags:** ignition81, perspective, scripting\
**Created:** [November 30, 2023, 11:19am UTC](https://forum.inductiveautomation.com/t/latitude-and-longitude/82524 "2023-11-30T11:19:53Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [November 30, 2023, 11:38am UTC](https://forum.inductiveautomation.com/t/latitude-and-longitude/82524/2 "2023-11-30T11:38:31Z")

</div>

> `coordinates = self.props.values()`

The property shown in the Property Editor is `value`, not `values`. Try,  
`coordinates = self.props.value`

That will return a **dictionary** , not a list, so you will need to refer to the elements using the key (and we can do it directly without introducing the `coordinates` variable):  
`lat = self.props.value.lat`  
`lng = self.props.value.lng`

Tips:

1. Use the Script Editor's Browse Properties button to pick properties. It can eliminate this type of error.
2. Post code as code, not as quotations. See below.

> [@Wiki - how to post code on this forum](https://forum.inductiveautomation.com/t/wiki-how-to-post-code-on-this-forum/77831):
>
> This thread is intended as a short help file for all those struggling to post formatted code on the forum. Posting formatted code on the forum (and most others) is as simple as selecting the code and pressing the \</\> button. It works the same as applying Bold or Italic styles to your document. It preserves indentation and applies syntax highlighting. [How to post code]

---

_[View the full topic](https://forum.inductiveautomation.com/t/latitude-and-longitude/82524)._
