Use WP Data Sync to make the development of your next project much easier. How? We seamlessly move data from its source, to its destination. This may sound simple. However, if you have multiple data sources with different array keys, data that is not in the correct format, or even raw data that needs to be processed. WP Data Sync can sort and organize the data for you.
We do this by mapping your raw data into WordPress objects. Then, we insert, update, or delete the data in your WordPress website based on the flow of new data. This keeps your WordPress website up and running. All while the data is being continuously updated behind the scenes.
Supported Data Sources
- JSON
- CSV
- WordPress
- WooCommerce
- Google Sheets
Using WP Data Sync to Develop a Map Search
First install the WP Data Sync Google GeoCode Extension on your WordPress website.
When creating a map search, there are a few things you need.
- Address
- GeoCode Coordinates – Latitude/Longitude
- Meta Data for the Subject
WP Data Sync can handle these for you. We map your raw data to produce an address from a single data field or from multiple data fields. Then, we use the Google GeoCode API to process the address into GeoCode coordinates.
Once we have obtained the appropriate data. We sync the data with your WordPress website. At this point the data is ready to be used by your application.
The WP Data Sync Google GeoCode Extension provides a custom database table to allow more complex map searches. We include an SQL WHERE clause to help with distance from subject searches.
public static function within_radius_where( $latitude, $longtitude, $radius ) {
global $wpdb;
$table_name = self::table_name();
if ( ! empty( $latitude ) and ! empty( $longtitude ) ) {
$where .= "
AND $wpdb->posts.ID
IN ( SELECT post_id FROM $table_name WHERE ( 3959 * acos( cos( radians($latitude) )
* cos( radians( latitude ) )
* cos( radians( longitude )
- radians($longtitude) )
+ sin( radians($latitude) )
* sin( radians( latitude ) ) ) ) <= $radius )
";
}
$where .=
"
AND $wpdb->posts.ID
NOT IN (SELECT post_id FROM $table_name
WHERE latitude = 0
AND longitude = 0)
";
return $where;
}
Map Search Use Cases
- Locate Dealer
- Locate Store
- Search Health Care Provider
- Search Fitness Trainer
- Search Office Location
- Search Property
- And many more…
Build address from multiple data fields
In the screenshot below you can see how to build an address from multiple data fields from within a multidimensional array.
$array = [
'address' => [
'street_address' => '123 E Main St.',
'city' => 'Scottsdale',
'state' => 'Arizona'
]
];
WP Data Sync Address Fields UI Example
Notice that you can add characters to the address for better visual presentation. In addition conditional logic is provided to allow for manipulation of the data.
Read more for a full example of how to create dynamic fields using multiple source keys.
Requesting GeoCode Coordinates
The process of requesting geocode coordinates from Google GeoCode API is all handled internally. All you need to do is obtain a Google API key and add it in the WP Data Sync GeoCode settings.
Ready for Development
Once the data is processed by the WP Data Sync API. It is synced into your WordPress website. At this point the data is ready for use by your application. This entire process can take only an hour or so. This translates into much shorter development and delivery times.
Contribute to the Project
- WP Data Sync – on WordPress.org
- WP Data Sync – on GitHub
- WP Data Sync Google GeoCode Extension – on GitHub
Get Started
-
Starter Plan
$39.00 / monthMore Info- 10,000 Requests/Month
- Unlimited Data Sources
- Unlimited Websites
- Unlimited Users
Basic Plan
$69.00 / monthMore Info- 40,000 Requests/Month
- Unlimited Data Sources
- Unlimited Websites
- Unlimited Users
Professional Plan
$129.00 / monthMore Info- 150,000 Requests/Month
- Unlimited Data Sources
- Unlimited Websites
- Unlimited Users
Data Source Mapping
$149.00 – $999.00More Info This product has multiple variants. The options may be chosen on the product pageLet us do the mapping for you!!We will map all your data sources for you, so you can move on to other projects that demand your time. One of our experts will map up to 50 fields for you in each data source.