Conditional marker images
| Project: | gProximity |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Currently, the gProximity configuration allows for a static selection of a marker image. Admittedly, I'm not sure what "clusters" do, but it looks like it allows some dynamic selection of marker images.
What would be very useful is a means to allow complete configurability of each marker image based upon some user configuration. The easiest way I can think to do this is the following:
1. Maintain the current configuration for "static" marker image selection.
2. Alternately, allow customized markers based upon custom PHP code which must evaluate to true for an alternate marker to be selected.
In the gProximity config for this new feature, it might look like this:
Default marker image: [select image] (if all other conditions below eval to FALSE)
Condition #1:
- Marker image: [select image]
- PHP code: [php code snippet to be evaluated to TRUE for above image to be displayed]
Condition #2:
- Marker image: [select image]
- PHP code: [php code snippet to be evaluated to TRUE for above image to be displayed]
...and so on
This is probably the most configurable way to do it. In my case, I want to place a non-default marker if the current node title being processed matches another node title of a different content type. For that to work, I would be performing a database query for every point to see if the node title matches. Granted, this is horribly inefficient for many markers on a map, but I don't know another [configurable] way to do it.
Ideas are welcome, especially for more efficient methods of enabling this.
