Download & Extend

Remove tile overlay on condition either by JS or PHP

Project:GMap Addons
Version:7.x-1.x-dev
Component:Documentation
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed (won't fix)

Issue Summary

Greetings!

I have map overlay using tiles from a third party service.

Using following macro:
[gmap overlay=tile/1.0:http://opencache.statkart.no/gatekeeper/gk/gk.open_gmaps?layers=sjo_hovedkart2&zoom={Z}&x={X}&y={Y} | zoom=10 |center=63.5,10.40546875 |width=400px |height=340px |control=Small |type=Map]

Users need a way to turn this overlay on or off. I am thinking of a way where user entity holds a on/off field. This may be done either by:

  • Using JS. Program a checkbox that turns overlay on or off using JS.
  • Using PHP. Hook into GMAP and alter the macro (remove tile overlay) when not needed. Alternatively, add it programmatically when needed.

How do I turn a tile overlay off (or on) via code? Is this possible using hook_gmap?
..or is this possible by adding alternate js using hook_gmap?

Any possible way is good:)

Thanks for all help!

Comments

#1

No longer relevant. :)

#2

Status:active» closed (won't fix)
nobody click here