• I am an amateur with editing raw source code from wordpress plugins. My problem is that I would like to make the search results which output in a table below the map area to have a function that when clicked not only is the info displayed but direct the browser to zero in on the location in the map. The results table can sometimes run long and not map will be off the screen so Something like adding a “jump to anchor point” is done with links in html coding would be great. I cannot find the php or template file which will allow me to edit the html output for the store results. Is this possible with one of the add ons like store pages? Or can this be expected in an update to pro pack? Any tips would be appreciated..

    http://wordpress.org/extend/plugins/store-locator-le/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Lance Cleveland

    (@charlestonsw)

    You do not want to do this with HTML or PHP. All map interaction, ESPECIALLY after it is loaded is managed with JavaScript using a combination of AJAX and JSONP calls/responses.

    Read the technical documentation on the site and look for the JavaScript call that fires whenever something is clicked below the map. A simple jQuery trigger would do what you want, but you’ll have to write all your manipulation code in JavaScript.

    http://www.charlestonsw.com/support/documentation/technical-documentation/

    Thread Starter recman012

    (@recman012)

    so would i be right to guess that this is the area of the code in csl.js file that I need to manipulate?

    * function: private handleInfoClicks
    * usage:
    * Sets the content to the info window and builds the sidebar when a user clicks a marker
    * parameters:
    * infoData:
    * the information to build the info window from (ajax result)
    * marker:
    * the csl.Marker to add the information to
    * returns: none
    */
    this.__handleInfoClicks = function(infoData, marker) {
    this.debugSearch(infoData);
    this.debugSearch(marker);
    this.debugSearch(this);
    this.infowindow.setContent(this.createMarkerContent(infoData));
    //this.infowindow.setContent(‘hi’);
    this.infowindow.open(this.gmap, marker.__gmarker);
    }

    Here I would place a jquery trigger written in javascript. Would it also require me to place a would I also need to code with the slp_javascript_results_string filter?

    Plugin Author Lance Cleveland

    (@charlestonsw)

    You would be better off creating your own separate script and loading it when the page loads. Some themes allow you to do that or you can get plugins that allow you to load your own custom javascript.

    You can also code the javascript right in the map page content.

    I don’t recommend hacking the script directly. Obviously as open-source GPL it is not a “hey don’t hack my code stuff”, have at it, it is more a “you won’t be able to easily upgrade/patch” issue.

    I’ve put a lot of work into hooks, filters, CSS and HTML structure to try to make it easier for other coders out there to not have to “change the guts” of the plugin. As anyone who has done this will know, it can become quite a chore to continue to re-patch the plugin. Especially with my frequent update schedule for SLP.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Clickable results in Table Anchor Jump to top’ is closed to new replies.