Makers Blog Archive

Latitude and Longitude on World Map Panel

David Hoysan 11 November 2019 min. read
2,790 views 0 comments

The purpose of this makers blog is to show how to set latitude and longitude in the Proficloud World Map panel using JSON endpoints

world map panel

First, create latitude and longitude using a JSON editor. I used https://jsonblob.com/


Here is some sample code that I used to create latitude and longitude code for Denver Colorado and San Jose California.
[
  {
    “key”: “CO”,
    “latitude”: 39.7392,
    “longitude”: -104.9903,
    “name”: “Denver CO”
  },
  {
    “key”: “CA”,
    “latitude”: 37.3382,
    “longitude”: -121.8863,
    “name”: “San Jose CA”
  }
]
 
Once you save the code, they will give you a key that you can use to edit later, but then also access the code via a JSON Endpoint URL
For example,

  • My key (for example): c9859faa-00cb-11ea-b2fd-dd4be2d04664
  • Website for editing the code: https://jsonblob.com/< your key> 
  • JSON Endpoint URL: https://jsonblob.com/api/jsonBlob/< your key >

 
You can then set the location data of the world map panel to be JSON Endpoint{jcomments on} and use the URL provided by the editor. You will also need to set the alias of the metric to match the “key” you entered in your JSON code.

World map json endpoint
world map alias

Note:

The Makers Blog shows applications and user stories of community members that are not tested or reviewed by Phoenix Contact.

Discussion

Please login/register to comment
Login/Register
Newsletter
Never miss a new article
Sign up for the newsletter
Never miss news about PLCnext Technology
Get interesting content via newsletter four times a year
Receive exclusive information before all other users