kylephillips / simple-locator Goto Github PK
View Code? Open in Web Editor NEWPlugin for Wordpress that provides powerful store locator type functionality for any post type
Home Page: http://locatewp.com/
Plugin for Wordpress that provides powerful store locator type functionality for any post type
Home Page: http://locatewp.com/
Need to grab last menu position, not hard-code in. Sites with hard-coded menu position may override location type's
make location joins in sql query conditional based on post type selected
add option to shortcode/widget to define the distance choices in the form
Minify front end styles & scripts. Add options to turn off styles & scripts, with textbox to display them.
Is there any way to search the place by name?
And some issues i've found.
There isn't the option to limit the results in the admin โ Can you limit results using the shortcode? Is there pagination?
Need to flush rewrites when saving post type options.
Add parameter in shortcode to specify a custom map container
Need to add optional "map" field in results data to include a single map along with result list. Also need to include option to hide "All" map (for O9 project)
need to rename classes and files with WP conventions in prep for submission
Remove namespacing for older php support, add in prefixes
Check all array declarations and remove any shorthand bracket styles
Need to assign meta fields to post type dynamically. Currently hard-coded to 'location', so they don't show on custom post type set by user.
Add an option/parameter to the all locations shortcode to include a list of locations below the map
need to design a front end site with documentation, support, faqs, etc
Add shortcode to add map on single view of location
Hi Kyle,
Im having issues displaying the built-in "locations" post-type, always results in 404.
Im building a list of "location" posts, but even if I link an entry directly to a menu, it still goes 404.
Any tips please?
Thanks.
Allow customization of locations post type labels/name.
Add option to add custom map styles
look at adding a data importer for locations post type, look at adding task runner to geocode existing post types.
Need Location post type icon for dashicons/menu
Add option to add geolocation button for enabled devices (add language about how only enabled devices will show the button, and it could cut down on api requests)
Version 2 feature: give option to show what fields get shown in the results.
Add option to output css. Provide SCSS
Look into adding an autocomplete option for the search form:
https://developers.google.com/maps/documentation/javascript/examples/places-autocomplete
Provide some choices for map styles (in addition to custom json styles). Link to one of the style repo sites.
After latest updated I got this.
Uncaught ReferenceError: data is not defined
simple-locator-all-locations.js:1
If I understand this correctly, the map will always retrieve all entries from the selected post-type. Would it be possible to have the map to show only the entries on screen?
Im building a business directory, for which im displaying all entries in a loop, paginated with 24 records per page. The ideia would be to have the map match the records displayed on screen, being updated at each page change.
This might outside the scope of the plugin's original intent, but it might greatly extend the plugin uses cases with what I imagine wouldn't be a too complex change.
Anyway i'll study the code to see if can achieve this, hopefully you can provide your insight here.
setup gulpfile/package.json, remove codekit dependecy
Add option to change button text, max number of results
Option to add default map location, replaced with results once they're loaded.
When I zoom in on the map, the list remains the same โ Is there a way of being able to hook onto the zoom into an area & change the results accordingly?
Issue with page cacheing and nonce generation. Forms on cache-enabled pages are not working due to nonce mis-match.
Possible solution: generate a nonce via AJAX on form submission, inject the nonce as a hidden form element, then submit the form.
May be helpful to have a shortcode that displays a map with all locations.
Other plugins commonly used with simple locator also add google maps. An option to manually turn off SL's version could help prevent conflicts.
Similar functionality as results list customization.
Possibly add option of selecting ACF map field. See solution here for saving to simple locator geocode fields:
https://wordpress.org/support/topic/possible-to-search-distance-between-posts-user?replies=5
Look at adding a widget form
Add some preconfigured map style options. Show preview for each. Make sure to add "default" for unstyled map.
Default to map pin
Possibly give option to use stored zip data to prevent API limits.
http://www.census.gov/geo/maps-data/data/gazetteer.html
look at adding an option to use open street maps instead of google maps
need to test with acf, as well as older versions of wp, debug on
When I use [simple_locator_all_locations]
the loading keeps spinning.
And debugger show this
Uncaught ReferenceError: wpsl_locator is not defined
simple-locator-all-locations.js:1
But [wp_simple_locator] works fine.
When you assign a custom post type to the plugin, it adds the location field to that post-type, which is nice, the problem is that the Geocode values will stay empty as you can see here:
http://snpy.link/qoLL2A
Ideally the fields should be hidden or populated with the data provided by the post.
Cheers.
Need better UI for address not found, with option to continue saving post without location. Possibly add modal with choices.
Hey Kyle,
A few questions about the search feature on the default form widget.
Im trying to implement a simple business directory using your plugin. This directory has entries from multiple countries, so search by country is quite important. Unfortunately the default search widget doesn't seem to do it, as searching by the country name always returns no results.
Another quick question, if I pass resultscontainer="#searchresults"
, shouldn't the dom elements inside that div
be replaced with the results from my search?
Update:
Adding to the problem searching by country, im noticing that searching by zip-code is also giving unexpected results.
I have this entry with the zip code value of 1100-200
, if I search by this exact same value it retrieves no results found, no matter what distance I pass it. This is the portuguese zip code format, does the plugin allow to use non-US zip codes?
Thanks again for any help.
When I set a Map Style and save the settings strange records are getting created within wp_posts.
With the following post_content...
[{"featureType":"water","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":17}]},{"featureType":"landscape","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":20}]},{"featureType":"road.highway","elementType":"geometry.fill","stylers":[{"color":"#000000"},{"lightness":17}]},{"featureType":"road.highway","elementType":"geometry.stroke","stylers":[{"color":"#000000"},{"lightness":29},{"weight":0.2}]},{"featureType":"road.arterial","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":18}]},{"featureType":"road.local","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":16}]},{"featureType":"poi","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":21}]},{"elementType":"labels.text.stroke","stylers":[{"visibility":"on"},{"color":"#000000"},{"lightness":16}]},{"elementType":"labels.text.fill","stylers":[{"saturation":36},{"color":"#000000"},{"lightness":40}]},{"elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"featureType":"transit","elementType":"geometry","stylers":[{"color":"#000000"},{"lightness":19}]},{"featureType":"administrative","elementType":"geometry.fill","stylers":[{"color":"#000000"},{"lightness":20}]},{"featureType":"administrative","elementType":"geometry.stroke","stylers":[{"color":"#000000"},{"lightness":17},{"weight":1.2}]}]
post_title: Shades of Grey
And if I delete the post my Map Styles go back to default.
Unless this is a conflict with my theme (X-Theme) or some other plugin somehow?
For some reason the post shows up in my portfolio and causes strange errors....
Add option to load google maps api over https.
remove container options from widget, update form view to conditionally check for options. Add option to hide map (also add to shortcode).
If location post type isn't being used, need to not show it in the menu (bug from dynamic post type update)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.