Needs review
Project:
Mapstraction
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
17 Jun 2010 at 03:30 UTC
Updated:
28 Dec 2010 at 18:43 UTC
Jump to comment: Most recent file
Comments
Comment #1
levelos commentedIn principal, sure that could be a nice feature to have available. Happy to review the patch if you want to submit it.
Comment #2
Bevan commentedThe attached patch adds support for Google Static Maps API.
The implementation/patch;
node_map.view.php?>") from the end of mapstraction.module, which can introduce "headers already sent" errors under certain versions/configurations of PHP, and is not Drupal convention/standard.The patch introduces some changes to the module's internal functions and API;
has_key,srcandrenderoptions for providers become optional.contentandvalidate settingsvalidate settingscallback allows a provider to validate submissions of the Views' style options form. The validator for the new provider, "googlestatic", checks thatwidthandheightare positive integers in pixels, and saves the integers for use at render-time. It callsform_set_errorif an invalid width/height are used. This is a screenshot.contentcallback for a provider is like the render callback, but takes an additional parameter$rows, which has the raw data to be rendered. The return value of the content callback populates$contentin themapstraction-maptheme hook.mapstraction-map.tpl.phpsupports a$contentvariable that contains content for the <div>.$contentis populated by the return value of thecontentcallback for each provider.googlestaticuse the basic content callbackmapstraction_basic_content(), thus setting$contentin the <div> to "Javascript must be enabled to view the map.". This text should be replaced on page load by the provider's initializer javascript. If any provider does not work with this, it'scontentcallback setting can be removed. That provider would then use an empty$contentvariable.mxnjavascript files andDrupal.settings.mapstractionsettings are only added to the page if the mapstraction javascript library has a file named according to the provider ID.Comment #3
Bevan commentedDrupal.org lost the patch on save. Trying again...
Comment #4
Bevan commentedComment #5
geerlingguy commentedThis would be a nice accessibility/mobile device feature. See 24 Ways' article on Static Maps. Subscribe, and I will look into reviewing at some point.