WP Data Access
  • Download
  • Support
  • Features
  • Pricing
  • Documentation
Select Page
Popular Search importsqlformqueryexport

WP Data Access

  • Getting started
  • Installation
  • What’s new?
  • Patches
  • Known limitations
  • FAQ

Data Tables

  • Getting Started
  • Creating and publishing
  • Responsive data tables
  • SEO friendly data tables
  • Adding hyperlinks
  • Extension Manager
  • Style Manager
  • Language settings
Styling
  • Style Manager
  • Premium styling
  • Global styling
  • Code Manager Styling
  • Manual styling
  • Styling issues
Filters
  • Static filters
  • Interactive filters
    • URL parameters
    • Search Panes
    • Search Builder
    • Search form
    • Advanced search
    • Geolocation search
Export & other buttons
  • Export to PDF, CSV, Excel, SQL
  • Print & copy buttons
  • Column selection buttons
  • Custom buttons
Advanced features
  • Advanced settings
  • Large tables & performance
  • Progressively SHOW MORE
  • Custom queries
  • Custom Post Types
  • Row grouping
  • Responsive master-detail
  • Master-detail tables
  • Non admin user access
Demos & tutorials
  • Demos
  • Tutorials

Data Apps

  • Data Projects
  • Projects and templates
  • Supported Data Types
  • One-To-Many relationships
  • Many-To-Many relationships
  • Registration page
  • Manage table options
  • Shortcode usage
Project Templates
  • Project Templates
  • Creating templates
  • Table Settings
  • Relationships
  • List Table
  • Data Entry
  • Reconcile
Data Forms
  • Data Forms
  • Overview
  • Project Demo
  • Page Demo
Advanced features
  • Adding filters
  • Custom validation
  • Add less/more button
  • User roles
  • Managing roles and users
  • Advanced table options
  • Advanced lookups
  • Front-end toolbar
  • Transfer to other WP site
Demos & tutorials
  • Demos
  • Tutorials

Data Explorer

  • Getting started
  • Navigation
  • Explore tables & views
  • Manage tables & views
  • Naming conventions
Manage Actions
  • Actions
Manage Settings
  • Settings
  • Search Settings
  • Geolocation Settings
  • Table Settings
  • Column Settings
  • Dynamic Hyperlinks
  • Dashboard Menus
Data Management
  • Import CSV & SQL files
  • Run SQL script files
  • Data Backup
Problems & solutions
  • InnoDB #rows estimation
  • Import file too large
  • Transfer to other WP DB

Remote Databases

  • MySQL | MariaDB
Other DBMS
  • Heterogeneous Connections
  • Using ODBC | JDBC
  • Connect to SQL Server
Premium Data Services
  • Remote wizard
  • START HERE
  • Errors and messages
  • Limitations
  • Tutorials
  • Remote Databases
    • Remote databases
    • SQL Server
    • PostgreSQL
    • Oracle
    • MariaDB | MySQL
    Remote Data Files
    • Remote data files
    • CSV files
    • JSON files
    • MS Access
    • XML files
    • Public URL
    • Synchronization
    Advanced features
    • Performance
    • Indexes

SQL

  • Getting Started
  • Tutorials
  • Visual Query Builder
  • Writing queries
  • Data exchange
  • Stored procedures
  • Database triggers
  • Scheduled queries

Business Intelligence

  • Getting started
  • Dashboards
  • Sharing dashboards
Dashboards Widgets
  • Dashboard Widgets
  • Publication Widget
  • Project Widget
  • Chart Widget
  • Custom Code Widget
  • Database Widget
  • Sharing Widgets

Table Design

  • Getting started
  • Introduction
  • Basic mode

Plugin Settings

  • Getting started
  • Plugin
  • Back-end
  • Front-end
  • Dashboard
  • Data Forms
  • Data Tables
  • Data Backup
  • Uninstall
  • Manage Repository
  • Manage Roles
  • System Info

Code

Shortcodes
  • Overview
  • wpdataaccess
  • wpdadataproject
  • wpdadataforms
  • wpdadiehard
  • wpdageomap
  • wpdawidget
Hooks & filters
  • Overview
  • Hooks
    • Overview
    • wpda_add_search_actions
    • wpda_add_search_filter
    • wpda_before_list_table
    • wpda_after_list_table
    • wpda_wpdataaccess_prepare
    Filters
    • Overview
    • wpda_column_default
    • wpda_before_simple_form
    • wpda_after_simple_form
    • wpda_construct_where_clause
API
  • WP Data Access API
  • Remote database access
  • CRUD Example
  • Extensions
    • Alternative search algorithm
    • Alternative buttons extension
Code Manager
  • Overview
  • Write code
  • Share(d) code

Geolocation Settings

Table of Contents
  • Features
  • Demos & Tutorials
  • Geolocation columns
  • Enabling Geolocation
    • Google Maps
    • Address lookup
    • Column Mapping
    • Initial location
    • User interaction
    • Dimensions
    • Markers
    • Status
  • Geolocation batch

WP Data Access > Data Explorer > Manage > Settings > Geolocation Settings

Features #

  • Google Maps integration
  • Map geolocation data to custom tables
  • Run batch updates
  • Generate maps from custom tables
  • Add customizable markers
  • Use user location on map
  • Radius search (from user or specific position)
  • Shortcode [ wpdageomap ]

Demos & Tutorials #

  • Demos
  • Tutorials
  • Simple geolocation demo
  • Add geolocation to publication (using fixed position)
  • Use user gps in publication
  • Create a Google Maps API key
  • Add geolocation columns to your table
  • Enable geolocation for your table
  • Run the geolocation batch procedure
  • Use shortcode [ wpdageomap  ] to add a map to your web page

Geolocation columns #

The plugin uses the Google Maps API to get geolocation information and stores this information in your database table to prevents unnecessary API calls and make geolocation queries as fast as possible. The geolocation settings page allows plugin users to store four geolocation values:

  • Latitude – float(10, 6)
  • Longitude- float(10, 6)
  • Location type – varchar(200)
  • Viewport – varchar(200)

The latitude and longitude must be stored in your database table to use geolocation search. The location type and viewport are currently not used, but it is advised to store this information for future enhancements. It is important to store this information in the given format. Below is an example of a create table script:

CREATE TABLE `stores` (
  `store_id`		bigint(11)	NOT NULL AUTO_INCREMENT,
  `store_name`		varchar(200)	NOT NULL,
  `store_address` 	varchar(200)	NOT NULL,
  `store_zip`		varchar(10),
  `store_city`		varchar(200)	NOT NULL,
  `store_info`		text,
  `store_site`		varchar(200),
  `store_phone`		varchar(10),
  `store_email`		varchar(200),
  `store_latitude`	float(10,6),	// stores latitude
  `store_longitude`	float(10,6),	// stores longitude
  `store_location_type`	varchar(200),	// stores location type
  `store_viewport`	varchar(200),	// stores viewport
  PRIMARY KEY (`store_id`)
);
To connect to the Google Maps API you need to store a valid Google Maps API key first. The plugin also needs to know the columns in which the geolocation information is stored. Once the information is stored in the related columns, you can use a shortcode to add a map to a web page that allows users to search through your table.

Enabling Geolocation #

WP Data Access - Data Explorer Geolocation Settings

Google Maps #

API key (mandatory) – The first step is to obtain a valid Google Maps API key. A key can be created for free. This should be sufficient for developers. Make sure to secure keys used on production servers.

Address lookup #

Select columns (mandatory) – The plugin uses these columns to get the geolocation information from the Google Maps API. The order in which you enter these columns can have an influence on the results. Use some test data to find the optimal order. You can check this by accessing Google Maps in your browser.

Column Mapping #

Latitude column (mandatory) – The plugin uses this column to store the latitude. Store the latitude in a column data type float(10,6).

Longitude column (mandatory) – The plugin uses this column to store the longitude. Store the longitude in a column data type float(10,6).

Location type (optional) – The plugin uses this column to store the location type. The location type is currently not used by the plugin. This information can be stored for future purposes.

Viewport (optional) – The plugin uses this column to store the location viewport. The location viewport is currently not used by the plugin. This information can be stored for future purposes.

Initial location #

Latitude (mandatory) – Default latitude if no user location.

Longitude (mandatory) – Default longitude if no user location.

Use User location | Static location (mandatory) – Select user or static location for the map.

Home marker | title | popup info (optional) – Add a marker to the static location or user position. Supports HTML.

User interaction #

Distance in (mandatory) – Select if range distance is to be calculated in kilometers or miles.

Show | Hide | Selectable (mandatory) – Selectable allows user to change the range. Only works with comma separated list of ranges.

Search radius (mandatory) – Fixed or selectable range. Range must be a comma separated list of integers.

Dimensions #

Width (mandatory) – Map width (use shortcode parameter map_width to overwrite).

Height (mandatory) – Map height (use shortcode parameter map_height to overwrite).

Inital zoom (mandatory) – Initial zoom (use shortcode parameter map_zoom to overwrite). Not used if automatically adjust zoom is enabled.

Automatically adjust zoom (mandatory) – Automatically adjusts zoom when user changes the range.

Markers #

Marker title | popup info – Define the layout of a marker. Support HTML and column values in title and popup info. Column values can be added using the $$column_name$$ format.

Max markers – Maximum number of markers added to a map.

Status #

Status – Can only be enabled if all mandatory fields are entered.

Geolocation batch #

The geolocation batch procedure uses the Google Maps API to update the geolocation information stored in a specific database table. The procedure is started from the Geolocation Settings of the table to be upated. See the “Batch update” button in the screenshot below (click to enlarge).

WP Data Access - Data Explorer Geolocation Settings
The “Batch update” button opens a new tab (see image below).
WP Data Access - Geolocation Batch Procedure

A selectbox allows the user to update all rows or only rows without geolacation information (no latitude and/or longitude). The number rows per update can also be entered. It is possible to cancel the batch procedure any time by pressing the cancel button.

Share This Article :
  • Facebook
  • Twitter
  • LinkedIn
  • Pinterest
Still stuck? How can we help?

How can we help?

Updated on 2022-12-20
Search SettingsTable Settings

5 Comments

  1. Andy McGraw
    Andy McGraw on 2021-09-27 at 4:52 pm

    Wonderful plugin! Are there plans to enable alternate ordering with geolocation? I would like to order my results by a date rather than distance from user. Thank You!

    Reply
    • Peter Schulz
      Peter Schulz on 2021-09-28 at 12:36 pm

      Thank you your compliement! 🙂 Alternate ordering of geomaps if currently not on my to do list, but it can be added… 🙂 Have you seen the integration with Data Tables? The Data Publication syncs the table data and the map. From there you can sort you table, while the map will be synced automatically. Does this help? Thanks, Peter

      Reply
      • Peter Schulz
        Peter Schulz on 2021-09-28 at 12:38 pm

        Sorry, forgot to add the link: https://wpdataaccess.com/publication-using-geolocation/

        Reply
  2. Charlie White
    Charlie White on 2022-12-15 at 3:24 pm

    I am looking to display real time vehicle tracking onto a Google map. I have an sql database with lat/lon updates every minute. Could I use your plugin ti achieve this?

    Reply
    • Peter Schulz
      Peter Schulz on 2022-12-16 at 2:04 pm

      Interesting question!

      Here is a publication with geolocation integration:
      https://wpdataaccess.com/publication-using-geolocation/

      The table data is shown on the map. When the table is updated, the map is synced. With the initiComplete options you can force a table update every 60 seconds. You can find example code here:
      https://wpdataaccess.com/docs/data-tables-advanced-features/advanced-settings/
      See: The following code auto updates a table each 10 seconds

      I haven’t tried this, but this should definitely work! Please drop a mail if you need help.

      Reply

Submit a Comment Cancel reply

Your email address will not be published. Required fields are marked *

Table of Contents
  • Features
  • Demos & Tutorials
  • Geolocation columns
  • Enabling Geolocation
    • Google Maps
    • Address lookup
    • Column Mapping
    • Initial location
    • User interaction
    • Dimensions
    • Markers
    • Status
  • Geolocation batch

Links

Blogs
Tutorials
Demos

Socials

LinkedIn
Twitter

Get in touch

Premium support
Free support forum
Contact us

Resources

WordPress plugin directory
YouTube tutorials

Passionate Programmers B.V. © 2017 - 2023 All rights reserved