Difference between revisions of "User:Brammers/Wiki Map Plugin"

From Neocron Wiki
Jump to: navigation, search
(New page: = Wiki map plugin = This is the current work in progress spec for the Wiki map plugin - please use the talk page for disccussion and sugguest changes. == Command format == The command w...)
 
(JQuery plugin found)
Line 21: Line 21:
  
 
When you move the mouse over a area, it highlights the area with a white overlay. This would need probably Jquery work to work with the HTML map elements, or a complete ground up approach using Jquery using image overlays and click events. Needs investigating and some prototyping work.
 
When you move the mouse over a area, it highlights the area with a white overlay. This would need probably Jquery work to work with the HTML map elements, or a complete ground up approach using Jquery using image overlays and click events. Needs investigating and some prototyping work.
 +
 +
Found a plugin that will do the job - http://plugins.jquery.com/project/maphilight
  
 
==And the future real nice to have would be ==
 
==And the future real nice to have would be ==

Revision as of 13:40, 6 May 2008

Wiki map plugin

This is the current work in progress spec for the Wiki map plugin - please use the talk page for disccussion and sugguest changes.

Command format

The command will be something like

<wiki:map image="filename" caption="World map"
 // Hotspts a square to link to page F02
rect="0,0,50,50" page="F02"
  // Plots a fixed
  // circle of 10px wth a link to 
  // Ceres Cave Page with tooltip saying "Entrance to ceres lab"
spot="100,100" page="Ceres Cave|Entrance to ceres lab"
  // Draws a cricle of 50px linking to Garbage Dump 
circle="500,500,50 page="Garbage dump"
/>

What would be nice to have

When you move the mouse over a area, it highlights the area with a white overlay. This would need probably Jquery work to work with the HTML map elements, or a complete ground up approach using Jquery using image overlays and click events. Needs investigating and some prototyping work.

Found a plugin that will do the job - http://plugins.jquery.com/project/maphilight

And the future real nice to have would be

spot="800,800" npc="Grimm" 

Which would pull out the npc template data and render it into a cluetip when the user hovers over the spot, and clicking on the spot would take the user to the Grimm NPC page.

Technical issues

The spot and rect params may have to be numbered, depending how well the wiki can handle multiple attributes of the same name. Same applies to the page attribute

Each map element may have to be (say)

rect="0,0,50,50|F02"

Other things to add?

Use the talk page! ;)