Fwd: PlanningPress

21 views
Skip to first unread message

Chris Abraham

unread,
Sep 12, 2011, 9:48:53 AM9/12/11
to planning...@googlegroups.com, Andrew Cochran
Andy,
Is this for the issue maps that Frank talked about for TFP portals?  If so, I imagined a solution that was lighter weight.  Storing each point as a post in Wordpress is quite heavy.  Frank mentioned to me that he didn't think points would need any content, just a lat/lon, date and issue type.  So there is probably an easier way to do this that wouldn't suffer from performance issues that you might see if you use post types.  

Chris


---------- Forwarded message ----------
From: Andrew Cochran <acoc...@openplans.org>
Date: Fri, Sep 9, 2011 at 6:31 PM
Subject: PlanningPress
To: Chris Abraham <cabr...@openplans.org>, Frank Hebbert <fr...@openplans.org>


Chris, when you have a moment, I'd like to go over my plan for how to
do adding points to maps. Here's my sketch…


CUSTOM POST TYPE
register_post_type 'mappoint'
add_post_meta 'latitude', 'longitude'

TAXONOMY
• register_taxonomy 'pointtype'
• insert extra fields in taxonomy edit form
 - add_post_meta 'color', 'icon' (sets how the 'pointtype' looks on front end)
 - HOW TO: http://www.codehooligans.com/2010/07/07/custom-meta-for-new-taxonomies-in-wordpress-3-0/

MAP TEMPLATE ADMIN
• add_post_meta 'zoomlevel','latitude', 'longitude'  (for default pan/zoom)
• add_post_meta 'droppable' (can users drop pins on map? regardless,
admins can on back end.)
• associate 'pointtype' taxonomy terms with post

MAP TEMPLATE (front-end)
• get list of 'pointtype' taxonomy terms associated w/ post
• loop through all CPT 'mappoint' posts w/ those terms, for each:
 - get_post_meta 'latitude' & 'longitude'
 - put a marker on the map
 - bind the_content to the marker's popup
• if post_meta 'droppable' = true
 - add 'pointtype' buttons to map UI for each associated term
 - buttons trigger placement of draggable marker in center
 - confirm button opens form for adding the_content


// doesn't require bikeshare.sql script
// optionally req WP's subscriber role (if !is_logged_in, 'pointtype'
buttons open registration form)

Chris Abraham

unread,
Sep 12, 2011, 11:07:27 AM9/12/11
to Andrew Cochran, planning...@googlegroups.com
You could just save the content as text, as we have been doing with bikeshare.
Chris



On Mon, Sep 12, 2011 at 10:53 AM, Andrew Cochran <acoc...@openplans.org> wrote:
What if we did want to have content for the points? To me, contextless
points don't serve much of a function. I understand that some issue
maps should be extremely simple/iconic, like NYCDOT's Chinatown study.
But I think we should do this in a way that's scalable, and other
issue maps would definitely benefit from content as they'll ask more
that simply "where" but also "why" (like bikeshare). Would there be a
way of doing points w/ content in a more lightweight way than I
described?
-Andy
Reply all
Reply to author
Forward
0 new messages