forked from MidAtlanticPortal/mp-visualize
-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Ryan Hodges edited this page Nov 19, 2025
·
3 revisions
This module empowers Madrona Planner with a map visualization portal.
Requires:
- madrona-portal
- mp-data-manager (retiring soon)
- mp-layers
- mp-features
- mp-scenarios
Supports:
- mp-survey
- mp-drawing
- portal app modules
This tab in the left navigation is only available to registered users, and is home to some of the most powerful tools in the portal, including Bookmarks, Shapes, and User-Imported Layers.
The setting PLANNER_APPS should be a list of names of modules that exist in INSTALLED_APPS. These are modules that have particular content to be rendered to the MyPlanner tab. At the time of this writing this is limited to the default options 'visualize' and 'drawing', as well as the new 'survey' module in mp-survey.
To enable a new module to populate a section in MyPlanner, you must create the following conditions:
- Module must be installed and included in
INSTALLED_APPS - Implement the following functions in
views.py:- get_myplanner_js(request):
- return a string of the
<script>tag to import necessary .js file(s)
- return a string of the
- get_myplanner_html(request, template):
- return a rendered template (
render_to_string) -
WARNING: this will be inserted using
{{ | safe }}, so be sure to sanitize any user-input prior to rendering!!!
- return a rendered template (
- get_myplanner_css
- return a string of the
<link>tag to import necessary .css file(s)
- return a string of the
- get_myplanner_dialog
- return a rendered template (
render_to_string) -
WARNING: this will be inserted using
{{ | safe }}, so be sure to sanitize any user-input prior to rendering!!!
- return a rendered template (
- get_myplanner_js(request):
- Add any URL redirection needed to
madrona-portal'surls.py- This is a great opportunity to identify a process to automatically detect and implement this as needed.