History of GmapPackage
Version 21
GmapPackage
A Wikid Google Map Engine
Goal
The goal of this project is to create a package that lets you edit a Google Map like a wiki, with some Flickr integration thrown in for spice.This will take the best features of sites like WikyBlog-Maps, VirtualGoogleEarth, and GeoBloggers and merge them in to a package for hosting your own wikimap rather than having to use the existing services which are limited to their hosting, their feature implementation, and their look and feel.
A Road Map for the package is well underway. You can find it below.
If you want to join in I'm not a professional programmer, but have faith, this is going to be sweet. If you do want to help out, well I guess you can email me wjames5 -at - nyc.rr.com or find me on the bitweaver irc thing.
Google Map Hacks to Include
- XMap Library
- GxMarkers Tools
- T-Labels
- PdMarker
- Custom Map Tiles
- Geocoding
References
http://mapki.comFlickr API
Flickr API Key Application
Puzzles
Sets
This needs to be a lot like categories. Markers and Polys need to be grouped, or added to sets, but it would make sense to be able to add them to multiple sets. Probably need a new table for this. Should the sets be nested. Could the Categories module be duplicated as is to serve as a set manager? Does it need any modification?RoadMap
Database Structure
TABLE: tiki_gmap
- map_id
- user_id
- version
- title
- description
- width
- height
- location_lat
- location_Lon
- zoom_level
- map_type
- show_controls (S/L/N)
- show_scale (T/F)
- show_map_types (T/F)
- init_marker_set
- init_polylines_set
- init_polygon_set
- add_map_types
- marker_sets
- polyline_sets
- polygon_sets
- comments (T/F?)
- points
- votes
- page_rank
- cache (?)
- wiki_cache (?)
- cache_timestamp (?)
- flag (?)
TABLE: tiki_gmap_marker
- marker_id
- name
- location_lat
- location_Lon
- icon_id (Style - Default or Custom)
- click_action (assign actions here or type?)
- window_data
- style_id (Style - Default/Custom)
- label_data (Tool Tip in PdMarker Class only)
- zindex
- flickr_image_id (path?)
TABLE: tiki_gmap_iconstyle
- icon_id
- name
- type (GIcon / XIcon)
- image
- image_size
- shadow_image
- shadow_size
- rollover (Image for PdMarker Type only? here or in marker styles below?)
- icon_anchor_x
- icon_anchor_y
- infowindow_anchor_x
- infowindow_anchor_y
- infoshadow_anchor_x
- infoshadow_anchor_y
TABLE: tiki_gmap_markerstyles
- style_id
- name
- type (PdMarker / XMarker])
- icon_hover_image (PdMarker Class)
- label_hover_opacity (PdMarker Class)
- label_opacity (PdMarker Class)
- label_hover_styles (CSS for PdMarker Class)
(should this also have a seperate style for label/tool tip when it is shown after click?) - window_styles (CSS for PdMarker Class)
(is this the same as above? - waiting for email from maker of PdMarker)
TABLE: tiki_gmap_polyline
- polyline_id
- name
- type (Default / XPolyline)
- points_data (an array)
- style_id
- border_text
- zindex
TABLE: tiki_gmap_polylinestyles
- style_id
- name
- color
- weight
- opacity
- pattern
- segment_count
- begin_arrow
- end_arrow
- arrows_every
- font (CSS)
- text_every
- text_fgstyle_color
- text_fgstyle_weight
- text_fgstyle_opacity
- text_fgstyle_zindex
- text_bgstyle_color
- text_bgstyle_weight
- text_bgstyle_opacity
- text_bgstyle_zindex
TABLE: tiki_gmap_polygon
note: Polygons must be XPolygons- polygon_id
- name
- type (Polygon / Circle)
- points_data (an array for polygon)
- center (for circle)
- radius (for circle)
- polylinestyle_id (uses polyline style above)
- style_id
- border_text
- zindex
TABLE: tiki_gmap_polygonstyles
- style_id
- name
- color
- weight
- opacity
TABLE tiki_gmap_sidepanel
- show (T/F)
- list_map_types (T/F)
- list_markers (T/F)
Basic Page Request Set by Step Outline
this is what must happen when a map page is requested.Get page id via $_REQUEST
(Look up page id and get map page)- Title
- Description
- Javascript
- Init Marker Set
- Init Polyline Set
- Init Polygon Set
- Marker Sets
- Polyline Sets
- Polygon Sets
- Comments (?)
- Get Marker Styles
- Get Icon Styles
- Get Polyline Styles
- Get Polygon Styles
Look up marker sets by id
- Create Set Arrays
- Get Marker ids per set
Look up markers by id
- Append Set Arrays
- Get Marker Data
- name
- javascript
- icon style id
- marker style id
Look up icons by id
(maybe there is a faster way to handle this...like maintain a list of icons in use for a map. Probably should do this for all styles.)- Check if icon id is already available
- register id to Icon Style Array
- Get javascript
Look up polyline sets by id
- Create Set Arrays
- Get Polyine ids per set
Look up polylines by id
- Javascript
- Style id
Look up polygon sets by id
- Create Set Arrays
- Get polygon ids per set
Look up polygons by id
- Javascript
- Style id
Interface Components
this is a start toward building the UI<form method="POST" action="submit.php" name="mapform" id="mapform">
Title <input name="map_title" id="map_title" type="text" size="25" value="Some Title" />
Description <input name="map_desc" id="map_desc" type="text" size="25" value="About this map" />
Width <input name="map_w" id="map_w" type="text" size="25" value="auto" />
Height <input name="map_h" id="map_h" type="text" size="25" value="auto" />
Latitude <input name="map_lat" id="map_lat" type="text" size="25" value="somenumber" />
Longitude <input name="map_lon" id="map_lon" type="text" size="25" value="somenumber" />
Zoom Level <input name="map_z" id="map_z" type="text" size="25" value="7" />
Map Type <select name="map_type" id="map_type"><option>Street Map</option><option>Satellite</option><option>Hybrid</option><option>Any custom map types</option></select>
Show Controls <select name="map_showcont" id="map_showcont"><option>Small</option><option>Large</option><option>None</option></select>
Show Scale <input name="map_showscale" id="map_showscale" type="checkbox" value="True" />
Show_map_types <input name="map_showtype" id="map_showtype" type="checkbox" value="True" />
Marker Sets (table with options)
Include On Launch <input name="map_marklaunch" id="map_marklaunch" type="checkbox" value="True" />
Include In Side Pane <input name="map_markside" id="map_markside" type="checkbox" value="True" />
Polylines Sets (table with options)
Include On Launch <input name="map_linelaunch1" id="map_linelaunch1" type="checkbox" value="True" />
Include In Side Pane <input name="map_lineside1" id="map_lineside1" type="checkbox" value="True" />
Polygon Sets (table with options)
Include On Launch <input name="map_polylaunch1" id="map_polylaunch1" type="checkbox" value="True" />
Include In Side Pane <input name="map_polyside1" id="map_polyside1" type="checkbox" value="True" />
Additional Map Types (table with options)
Include On Launch <input name="map_typelaunch1" id="map_typelaunch1" type="checkbox" value="True" />
Include In Side Pane <input name="map_typeside1" id="map_typeside1" type="checkbox" value="True" />
Comments <input name="map_comm" id="map_comm" type="checkbox" value="True" />
<input type="submit" name="mapsubmit" value="Submit" /></form>
<form method="POST" action="submit.php" name="markerform" id="markerform">
Name<input name="marker_name" id="marker_name" type="text" size="25" value="somenumber" />
Latitude<input name="marker_lat" id="marker_lat" type="text" size="25" value="somenumber" />
Longitude<input name="marker_lon" id="marker_lon" type="text" size="25" value="somenumber" />
Icon Type<select name="marker_icontype" id="marker_icontype"><option>Default Style</option><option>Custom Style 1</option><option>Custom Style 1</option></select>
Click Action (assign actions here or type?)
Window Text<textarea name="marker_wintext" id="marker_wintext" cols="30" rows="5" />
Marker Style<select name="marker_style" id="marker_style"><option>Default Style</option><option>Custom Style 1</option><option>Custom Style 1</option></select>
Label Text <textarea name="marker_labeltext" id="marker_labeltext" cols="30" rows="2" />
zIndex <input name="marker_zi" id="marker_zi" type="text" size="25" value="auto" />
Flickr Image (how to get path? menu?)
Name <input name="icon_name" id="icon_name" type="text" size="25" value="Some Name" />
Type<select name="icon_type" id="icon_type"><option>GIcon</option><option>XIcon</option></select>
Icon Image Path <input name="icon_img" id="icon_img" type="text" size="25" value="Some Value" />
Image Size <input name="icon_imgsize" id="icon_imgsize" type="text" size="25" value="Some Value" />
Shadow Image Path <input name="icon_shadow" id="icon_shadow" type="text" size="25" value="Some Value" />
Shadow Size <input name="icon_shadowsize" id="icon_shadowsize" type="text" size="25" value="Some Value" />
Icon Anchor x <input name="icon_anchorx" id="icon_anchorx" type="text" size="25" value="Some Value" />
Icon Anchor y <input name="icon_anchory" id="icon_anchory" type="text" size="25" value="Some Value" />
Info Window Anchor x <input name="icon_winanchorx" id="icon_winanchorx" type="text" size="25" value="Some Value" />
Info Window Anchor y <input name="icon_winanchory" id="icon_winanchory" type="text" size="25" value="Some Value" />
Info Shadow Anchor x <input name="icon_shadowanchorx" id="icon_shadowanchorx" type="text" size="25" value="Some Value" />
Info Shadow Anchor y <input name="icon_shadowanchory" id="icon_shadowanchory" type="text" size="25" value="Some Value" />
Name <input name="marker_styname" id="marker_styname" type="text" size="25" value="Some Value" />
Type <select name="marker_stytype" id="marker_stytype"><option>PdMarker</option><option>XMarker</option></select>
(PdMarker Class Only)
Icon Hover Image Path <input name="icon_hover" id="icon_hover" type="text" size="25" value="Some Value" />
Label Hover Opacity <input name="icon_hoverop" id="icon_hoverop" type="text" size="25" value="A Number" />
Label Opacity <input name="icon_labelop" id="icon_labelop" type="text" size="25" value="A Number" />
Label Hover Styles <input name="icon_hoverstyle" id="icon_hoverstyle" type="text" size="25" value="Some Value" />
Window Styles <input name="icon_winstyle" id="icon_winstyle" type="text" size="25" value="Some Value" />
<input type="submit" name="markersubmit" value="Submit" /></form>
<form method="POST" action="submit.php" name="polyform" id="polyform">
Name <input name="line_name" id="line_name" type="text" size="25" value="Some Value" />
Type<select name="line_type" id="line_type"><option>Default</option><option>XPolyline</option></select>
Points Data <textarea name="line_data" id="line_data" cols="30" rows="5" />
Style<select name="line_style" id="line_style"><option>Default</option><option>Custom</option></select>
(selects a style by id
Border Text <input name="line_bordertext" id="line_bordertext" type="text" size="25" value="Some Value" />
zIndex <input name="line_zi" id="line_zi" type="text" size="25" value="A Number" />
Name <input name="line_styname" id="line_styname" type="text" size="25" value="Some Value" />
Color <input name="line_color" id="line_color" type="text" size="25" value="Hex Value" />
Weight <input name="line_name" id="line_name" type="text" size="25" value="A Number" />
Opacity <input name="line_w" id="line_w" type="text" size="25" value="A Number" />
Pattern <input name="line_pattern" id="line_patter" type="text" size="25" value="A Number" />
Segment_count <input name="line_seg" id="line_seg" type="text" size="25" value="A Number" />
Begin Arrow <input name="line_beginarrow" id="line_beginarrow" type="checkbox" value="True" />
End Arrow <input name="line_endarrow" id="line_endarrow" type="checkbox" value="True" />
Arrows Every <input name="line_arrowint" id="line_arrowint" type="text" size="25" value="A Number" />
Font (CSS) <input name="line_font" id="line_font" type="text" size="25" value="Some Value" />
Text Every <input name="line_textint" id="line_textint" type="text" size="25" value="A Number" />
Text fgstyle_color <input name="line_txtfgcolor" id="line_txtfgcolor" type="Text" size="25" value="Hex Value" />
Text fgstyle_weight <input name="line_txtfgweight" id="line_txtfgweight" type="Text" size="25" value="A Number" />
Text fgstyle_opacity <input name="line_txtfgop" id="line_txtfgop" type="Text" size="25" value="A Number" />
Text fgstyle_zindex <input name="line_txtfgzi" id="line_txtfgzi" type="Text" size="25" value="A Number" />
Text bgstyle_color <input name="line_txtbgcolor" id="line_txtbgcolor" type="Text" size="25" value="Hex Value" />
Text bgstyle_weight <input name="line_txtbgweight" id="line_txtbgweight" type="Text" size="25" value="A Number" />
Text bgstyle_opacity <input name="line_txtbgop" id="line_txtbgop" type="Text" size="25" value="A Number" />
Text bgstyle_zindex <input name="line_txtbgzi" id="line_txtbgzi" type="Text" size="25" value="A Number" />
Name <input name="poly_name" id="poly_name" type="text" size="25" value="Some Value" />
Type<select name="poly_type" id="poly_type"><option>Polygon</option><option>Circle</option></select>
Points Data <textarea name="poly_data" id="poly_data" cols="30" rows="2">An Array</textarea>
Center <input name="poly_center" id="poly_center" type="Text" size="25" value="A Lat/Lon Array" />
Radius <input name="poly_radius" id="poly_radius" type="Text" size="25" value="A Number" />
Border Style<select name="poly_borderstyle" id="poly_borderstyle"><option>Custom 1</option><option>Custom 2</option></select>
(this is a polyline style)
Style<select name="poly_style" id="poly_style"><option>Custom 1</option><option>Custom 2</option></select>
(this is a polygon style)
Border Text <input name="poly_bordertext" id="poly_bordertext" type="text" size="25" value="Some Value" />
zIndex <input name="poly_zi" id="poly_zi" type="text" size="25" value="A Number" />
Name <input name="poly_styname" id="poly_styname" type="text" size="25" value="Some Value" />
Color <input name="poly_color" id="poly_color" type="text" size="25" value="A Number" />
Weight <input name="poly_weight" id="poly_weight" type="text" size="25" value="A Number" />
Opacity <input name="poly_op" id="poly_op" type="text" size="25" value="A Number" />
<input type="submit" name="polysubmit" value="Submit" /></form>
Map Tools
Title <input name="map_title" id="map_title" type="text" size="25" value="Some Title" />
Description <input name="map_desc" id="map_desc" type="text" size="25" value="About this map" />
Width <input name="map_w" id="map_w" type="text" size="25" value="auto" />
Height <input name="map_h" id="map_h" type="text" size="25" value="auto" />
Latitude <input name="map_lat" id="map_lat" type="text" size="25" value="somenumber" />
Longitude <input name="map_lon" id="map_lon" type="text" size="25" value="somenumber" />
Zoom Level <input name="map_z" id="map_z" type="text" size="25" value="7" />
Map Type <select name="map_type" id="map_type"><option>Street Map</option><option>Satellite</option><option>Hybrid</option><option>Any custom map types</option></select>
Show Controls <select name="map_showcont" id="map_showcont"><option>Small</option><option>Large</option><option>None</option></select>
Show Scale <input name="map_showscale" id="map_showscale" type="checkbox" value="True" />
Show_map_types <input name="map_showtype" id="map_showtype" type="checkbox" value="True" />
Marker Sets (table with options)
Include On Launch <input name="map_marklaunch" id="map_marklaunch" type="checkbox" value="True" />
Include In Side Pane <input name="map_markside" id="map_markside" type="checkbox" value="True" />
Polylines Sets (table with options)
Include On Launch <input name="map_linelaunch1" id="map_linelaunch1" type="checkbox" value="True" />
Include In Side Pane <input name="map_lineside1" id="map_lineside1" type="checkbox" value="True" />
Polygon Sets (table with options)
Include On Launch <input name="map_polylaunch1" id="map_polylaunch1" type="checkbox" value="True" />
Include In Side Pane <input name="map_polyside1" id="map_polyside1" type="checkbox" value="True" />
Additional Map Types (table with options)
Include On Launch <input name="map_typelaunch1" id="map_typelaunch1" type="checkbox" value="True" />
Include In Side Pane <input name="map_typeside1" id="map_typeside1" type="checkbox" value="True" />
Comments <input name="map_comm" id="map_comm" type="checkbox" value="True" />
<input type="submit" name="mapsubmit" value="Submit" /></form>
<form method="POST" action="submit.php" name="markerform" id="markerform">
Marker Tools
Marker
Name<input name="marker_name" id="marker_name" type="text" size="25" value="somenumber" />
Latitude<input name="marker_lat" id="marker_lat" type="text" size="25" value="somenumber" />
Longitude<input name="marker_lon" id="marker_lon" type="text" size="25" value="somenumber" />
Icon Type<select name="marker_icontype" id="marker_icontype"><option>Default Style</option><option>Custom Style 1</option><option>Custom Style 1</option></select>
Click Action (assign actions here or type?)
Window Text<textarea name="marker_wintext" id="marker_wintext" cols="30" rows="5" />
Marker Style<select name="marker_style" id="marker_style"><option>Default Style</option><option>Custom Style 1</option><option>Custom Style 1</option></select>
Label Text <textarea name="marker_labeltext" id="marker_labeltext" cols="30" rows="2" />
zIndex <input name="marker_zi" id="marker_zi" type="text" size="25" value="auto" />
Flickr Image (how to get path? menu?)
Custom Icon Tools
Name <input name="icon_name" id="icon_name" type="text" size="25" value="Some Name" />
Type<select name="icon_type" id="icon_type"><option>GIcon</option><option>XIcon</option></select>
Icon Image Path <input name="icon_img" id="icon_img" type="text" size="25" value="Some Value" />
Image Size <input name="icon_imgsize" id="icon_imgsize" type="text" size="25" value="Some Value" />
Shadow Image Path <input name="icon_shadow" id="icon_shadow" type="text" size="25" value="Some Value" />
Shadow Size <input name="icon_shadowsize" id="icon_shadowsize" type="text" size="25" value="Some Value" />
Icon Anchor x <input name="icon_anchorx" id="icon_anchorx" type="text" size="25" value="Some Value" />
Icon Anchor y <input name="icon_anchory" id="icon_anchory" type="text" size="25" value="Some Value" />
Info Window Anchor x <input name="icon_winanchorx" id="icon_winanchorx" type="text" size="25" value="Some Value" />
Info Window Anchor y <input name="icon_winanchory" id="icon_winanchory" type="text" size="25" value="Some Value" />
Info Shadow Anchor x <input name="icon_shadowanchorx" id="icon_shadowanchorx" type="text" size="25" value="Some Value" />
Info Shadow Anchor y <input name="icon_shadowanchory" id="icon_shadowanchory" type="text" size="25" value="Some Value" />
Custom Marker Tools
Name <input name="marker_styname" id="marker_styname" type="text" size="25" value="Some Value" />
Type <select name="marker_stytype" id="marker_stytype"><option>PdMarker</option><option>XMarker</option></select>
(PdMarker Class Only)
Icon Hover Image Path <input name="icon_hover" id="icon_hover" type="text" size="25" value="Some Value" />
Label Hover Opacity <input name="icon_hoverop" id="icon_hoverop" type="text" size="25" value="A Number" />
Label Opacity <input name="icon_labelop" id="icon_labelop" type="text" size="25" value="A Number" />
Label Hover Styles <input name="icon_hoverstyle" id="icon_hoverstyle" type="text" size="25" value="Some Value" />
Window Styles <input name="icon_winstyle" id="icon_winstyle" type="text" size="25" value="Some Value" />
<input type="submit" name="markersubmit" value="Submit" /></form>
<form method="POST" action="submit.php" name="polyform" id="polyform">
Polyline Tools
Ployline
Name <input name="line_name" id="line_name" type="text" size="25" value="Some Value" />
Type<select name="line_type" id="line_type"><option>Default</option><option>XPolyline</option></select>
Points Data <textarea name="line_data" id="line_data" cols="30" rows="5" />
Style<select name="line_style" id="line_style"><option>Default</option><option>Custom</option></select>
(selects a style by id
Border Text <input name="line_bordertext" id="line_bordertext" type="text" size="25" value="Some Value" />
zIndex <input name="line_zi" id="line_zi" type="text" size="25" value="A Number" />
Polyline Styles
Name <input name="line_styname" id="line_styname" type="text" size="25" value="Some Value" />
Color <input name="line_color" id="line_color" type="text" size="25" value="Hex Value" />
Weight <input name="line_name" id="line_name" type="text" size="25" value="A Number" />
Opacity <input name="line_w" id="line_w" type="text" size="25" value="A Number" />
Pattern <input name="line_pattern" id="line_patter" type="text" size="25" value="A Number" />
Segment_count <input name="line_seg" id="line_seg" type="text" size="25" value="A Number" />
Begin Arrow <input name="line_beginarrow" id="line_beginarrow" type="checkbox" value="True" />
End Arrow <input name="line_endarrow" id="line_endarrow" type="checkbox" value="True" />
Arrows Every <input name="line_arrowint" id="line_arrowint" type="text" size="25" value="A Number" />
Font (CSS) <input name="line_font" id="line_font" type="text" size="25" value="Some Value" />
Text Every <input name="line_textint" id="line_textint" type="text" size="25" value="A Number" />
Text fgstyle_color <input name="line_txtfgcolor" id="line_txtfgcolor" type="Text" size="25" value="Hex Value" />
Text fgstyle_weight <input name="line_txtfgweight" id="line_txtfgweight" type="Text" size="25" value="A Number" />
Text fgstyle_opacity <input name="line_txtfgop" id="line_txtfgop" type="Text" size="25" value="A Number" />
Text fgstyle_zindex <input name="line_txtfgzi" id="line_txtfgzi" type="Text" size="25" value="A Number" />
Text bgstyle_color <input name="line_txtbgcolor" id="line_txtbgcolor" type="Text" size="25" value="Hex Value" />
Text bgstyle_weight <input name="line_txtbgweight" id="line_txtbgweight" type="Text" size="25" value="A Number" />
Text bgstyle_opacity <input name="line_txtbgop" id="line_txtbgop" type="Text" size="25" value="A Number" />
Text bgstyle_zindex <input name="line_txtbgzi" id="line_txtbgzi" type="Text" size="25" value="A Number" />
Polygon Tools
Polygon
Name <input name="poly_name" id="poly_name" type="text" size="25" value="Some Value" />
Type<select name="poly_type" id="poly_type"><option>Polygon</option><option>Circle</option></select>
Points Data <textarea name="poly_data" id="poly_data" cols="30" rows="2">An Array</textarea>
Center <input name="poly_center" id="poly_center" type="Text" size="25" value="A Lat/Lon Array" />
Radius <input name="poly_radius" id="poly_radius" type="Text" size="25" value="A Number" />
Border Style<select name="poly_borderstyle" id="poly_borderstyle"><option>Custom 1</option><option>Custom 2</option></select>
(this is a polyline style)
Style<select name="poly_style" id="poly_style"><option>Custom 1</option><option>Custom 2</option></select>
(this is a polygon style)
Border Text <input name="poly_bordertext" id="poly_bordertext" type="text" size="25" value="Some Value" />
zIndex <input name="poly_zi" id="poly_zi" type="text" size="25" value="A Number" />
Polygon Style
Name <input name="poly_styname" id="poly_styname" type="text" size="25" value="Some Value" />
Color <input name="poly_color" id="poly_color" type="text" size="25" value="A Number" />
Weight <input name="poly_weight" id="poly_weight" type="text" size="25" value="A Number" />
Opacity <input name="poly_op" id="poly_op" type="text" size="25" value="A Number" />
<input type="submit" name="polysubmit" value="Submit" /></form>