Zh OpenStreetMap Visualization: Difference between revisions

From Documentation
Jump to navigation Jump to search
(Created page with "== Preface == Use visualization to show data from other data sources. To do it you should do next steps: * create '''Structure''' * create '''Data Source''', assign your ''...")
 
mNo edit summary
Line 1: Line 1:
== Preface ==
== Preface ==


Use visualization to show data from other data sources.
Use visualization to show data from other data sources (database tables).


To do it you should do next steps:
To do it you should do next steps:
Line 20: Line 20:


In Data Source you define SQL statement to get data from database.
In Data Source you define SQL statement to get data from database.
For flexible use there is only one field for SELECT statement, you can just create it in phpMyAdmin, copy/paste and use it.
You can use for table names as full names, as names in joomla notation (ie starting from #__)
== Examples ==
Lets create a few examples to show how you can use visualization on your site.
I don't create new tables, I will use tables from my extension.
=== Separate columns for latitude and longitude ===
Lets create Structure
Add main information
[[File:Visualization-Structure-Main.png]]
Add columns description
In this example I created structure, which describe that my data will contain two columns - '''lat''' and '''lng'''.
For this our test example we have to define only two fields.
In other words my SQL will have columns ''lat'' and ''lng''
[[File:Visualization-Structure-Columns.png]]
When come back to Structure list we can see our Structure.
[[File:Visualization-Structure-List.png]]

Revision as of 11:45, 13 November 2019

Preface

Use visualization to show data from other data sources (database tables).

To do it you should do next steps:

  • create Structure
  • create Data Source, assign your Structure
  • create Path or Placemark, assign your Data Source

Here you can see main page for visualization.

Structure

In Structure you enter information about your data, ie column names to use from data source, and other attributes.

Data Source

In Data Source you define SQL statement to get data from database.

For flexible use there is only one field for SELECT statement, you can just create it in phpMyAdmin, copy/paste and use it.

You can use for table names as full names, as names in joomla notation (ie starting from #__)


Examples

Lets create a few examples to show how you can use visualization on your site.

I don't create new tables, I will use tables from my extension.


Separate columns for latitude and longitude

Lets create Structure

Add main information

Add columns description

In this example I created structure, which describe that my data will contain two columns - lat and lng.

For this our test example we have to define only two fields.

In other words my SQL will have columns lat and lng


When come back to Structure list we can see our Structure.