Jump to content

Displaying custom points?


Christopher Ambler

Recommended Posts

Okay, now that I've leveraged the geomaps for my users to pick their location, it's time to display it all.

 

So I'm looking at the geomaps module and see that it calls into the plugin after setting some parameters. One of the parameters is where it gets its data from.

 

So setting the ['data']['controller'] to 'module_geomaps' the action is also set to 'listings' which, I presume, means that the display is going to then look at the parameters for the module to figure out which listings to look for, and all of the actual work is going to get done in ModuleGeomapsController::listings() that lives in components/com_jreviews_addons/geomaps/controllers/modules/module_geomaps_controller.php yes?

 

Okay, so if I want to get the data myself, would it be as easy as changing the ['data']['action'] to 'memberlocations' (for example) and creating a function called memberlocations() in ModuleGeomapsController? Then I could load up the latitude and longitude of my membership for display?

 

Is it that easy? Or is there a better way? Would I be better off cloning ModuleGeomapsController and calling it something like ModuleGeomapsMembershipController? If so, how would I map the value I passed in ['data']['controller'] to the new class?

 

Point me in the right direction :-)

Link to comment
×
×
  • Create New...