Title: Solerdev's Replies | WordPress.org

---

# Solerdev

  [  ](https://wordpress.org/support/users/solerdev/)

 *   [Profile](https://wordpress.org/support/users/solerdev/)
 *   [Topics Started](https://wordpress.org/support/users/solerdev/topics/)
 *   [Replies Created](https://wordpress.org/support/users/solerdev/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/solerdev/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/solerdev/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/solerdev/engagements/)
 *   [Favorites](https://wordpress.org/support/users/solerdev/favorites/)

 Search replies:

## Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Comprehensive Google Map Plugin] [Plugin: Comprehensive Google Map Plugin] Clickable list/sidebar](https://wordpress.org/support/topic/plugin-comprehensive-google-map-plugin-clickable-listsidebar/)
 *  [Solerdev](https://wordpress.org/support/users/solerdev/)
 * (@solerdev)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/plugin-comprehensive-google-map-plugin-clickable-listsidebar/#post-2611202)
 * the example link, I forgot to make it code mode:
 *     ```
       <a class="moveGoogleMap" href="#-37.09024,-68.554687,4">chile</a>
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Comprehensive Google Map Plugin] [Plugin: Comprehensive Google Map Plugin] Clickable list/sidebar](https://wordpress.org/support/topic/plugin-comprehensive-google-map-plugin-clickable-listsidebar/)
 *  [Solerdev](https://wordpress.org/support/users/solerdev/)
 * (@solerdev)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/plugin-comprehensive-google-map-plugin-clickable-listsidebar/#post-2611201)
 * Hi,
    Excellent plugin, thank you! I’m looking for a method to change the location
   of the map by clicking links. I didn’t find a way to do it on a “onClick” event
   or from another JS code. Someone knows how to do that? something about namespace
   I think.
 * After some tests, I made an alternative method that maybe can help someone:
 * Adding this code in cgmp.framework.js (or .min.js)
    at the end of if ($(‘div#’
   + json.id).length > 0) {
 * **–>here**
    }else{ //Logger.fatal… }
 * the added code is:
 *     ```
       $('.moveGoogleMap').click(function(e){
       	e.preventDefault();
       	newCoords = $(this).attr("href").split(" ").join("").split("#").join("").split(",")
       	if(newCoords[0] != "" && newCoords[0] != undefined && newCoords[0] != null && newCoords[1] != "" && newCoords[1] != undefined && newCoords[1] != null){
   
       		googleMap.setCenter(new google.maps.LatLng( newCoords[0], newCoords[1] ) );
       		if(newCoords[2] != "" && newCoords[2] != undefined && newCoords[2] != null){
       			googleMap.setZoom(parseInt(newCoords[2]));
       		}
       	}
       })
       ```
   
 * It adds the hability to any link with the class “moveGoogleMap” change the map
   by coords and zoom in the href attribute. The info is comma separated.
    like 
   this:
 * [chile](https://wordpress.org/support/users/solerdev/replies/?output_format=md#-37.09024,-68.554687,4)
 * hope it helps, Thanks again for the plugin!

Viewing 2 replies - 1 through 2 (of 2 total)