Extension:Ricks Google Maps

From MediaWiki.org

Jump to: navigation, search
Manual on MediaWiki Extensions
List of MediaWiki Extensions
Ricks Google Maps

Release status: unknown

Implementation Tag
Description
Author(s) Rick
Last Version 001 alpha
MediaWiki 1.7.1 (others?)
License No license specified
Download none yet

I've been developing my own maps extension because none of the ones that existed did what I wanted, which was to allow users to point and click to add, edit, and navigate to pages, basically requiring the lat/lng points to be stored in a database not in wiki format.

Saying that, Google Maps Extension looked good the last time I saw it, and when I have time I'll contact its creator and see about giving him any useful code I have (and borrowing any he has!)

I've been hacking together the code so far, which can be seen at at the manchester university student wiki. You can see the start of a user guide here

Contents

[edit] Download and Project status

There's no version for download yet. Its currently being formatted to make it easy for inclusion in other wiki's, and will be ready in the next couple of weeks. If anyone wants it now, email User:Rick using the "email this user", and I'll get back to you. It works fine, but I need to polish up the code. If your interested in this but not in a rush, email Rick any way to make him happy!

[edit] Features

  • Add, edit, delete locations
  • History of all changes to the locations, including recent changes
  • Locations are called the name of the page it will link to (for simplicity)
  • A filter to show only locations of whichever catagories the user wants
  • The map view (ie, lat lng and zoom level) and the filter settings can be saved by right clicking on "This map view" hyperlink, and can be saved as a book mark or sent to another user
  • Two basic views:
    • Split screen with the wiki on the right and map on the left. Clicking on a map location makes the wiki frame go to that page
    • Edit view. You can edit the map, and clicking on a location acts as a hyperlink to the full wiki page.
  • Calls the Wiki database via query.php and finds out if the user is logged on. Saves edits to the database under that users name.

[edit] Technical construction

  • Saves filters, locations etc in a database table, not in the wiki
  • Uses PHP to access the database
  • Code is written in Javascript

[edit] To do

  • Make the code usable by other people!
    • Currently I'm putting it into classes so its a easier to setup and more maintainable for people that aren't me!
    • Part of this is seperating the interface from the code, so admins can change the display to however they want by altering the CSS and HTML output, without needing to know how the code works
  • Finish the page to allow altering what the possible catagories there are in the filter view

[edit] To do a bit further in the future

I'd like to make it not depend on google maps, but allow choice in which map service to use. I'll either use a F/OSS at http://www.openlayers.org or a F/OSS at http://www.mapstraction.com/ both of which allow this. Getting the code Object Orientated is required before I do this. Should be straight forward after I get to grips how either of them work.

Get one of the extensions that allow embedding a map in MW to work, I think I got one working but only if Firefox, it crashed Internet explorer. When it works you will be able to do <map></map> and it has a map in a nice frame for whatever the current page name is.

See if its feasible (and see it the maker minds) to fork/borrow the code of Google Maps Extension to let users place a location on the map from the MW's Edit page, and not have to go to the map webpage to edit the map.

Code rollback change if I think its needed

Personal tools