Closed (won't fix)
Project:
Drupal.org security advisory coverage applications
Component:
module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
27 Aug 2012 at 05:39 UTC
Updated:
29 Jan 2013 at 21:15 UTC
This is a simple module that adds mbtiles layer type to the OpenLayers Module in Drupal 7.
It is a functionality I needed for the development of the myregion.gov.au project which uses tilestache to render mbtiles generated with TileMill. Without this module there is no way to make the mbtiles render in the correct Y-axis order which renders the map incorrectly.
The sandbox project can be found here: http://drupal.org/sandbox/rubenspeculis/1757754
It can be cloned:
git clone --recursive --branch 7.x-1.x http://git.drupal.org/sandbox/rubenspeculis/1757754.git mbtiles_for_openlayers
I will update this once I have done some reviews.
Kind regards,
Rubens
Comments
Comment #1
2phaMy first review !
You are still working in the master branch. Please checkout the following documentation to eliminate this problem. http://drupal.org/empty-git-master
Please checkout the errors pointed out by the automated review : http://ventral.org/pareview/httpgitdrupalorgsandboxrubenspeculis1757754
Comment #2
2phaComment #3
amitgoyal commented1.Please add git link corresponding to non-maintainer like "git clone http://git.drupal.org/sandbox/rubenspeculis/1757754.git mbtiles_for_openlayers" in the issue summary.
2. In .info file
Remove ; $Id$ on line 1.
2. In mbtiles_for_openlayers.module, mbtiles_for_openlayers_uninstall() : The uninstall hook must be implemented in the module's .install file refer http://api.drupal.org/api/drupal/modules!system!system.api.php/function/....
3. Not required : drupal_uninstall_schema('mbtiles_for_openlayers');
as tables defined in the module are removed automatically when the module is uninstalled refer http://api.drupal.org/api/drupal/modules!system!system.api.php/function/....
Comment #4
rubenspeculis commentedThanks @2pha and @amitigoyal.
1. I've moved out of master and updated the git link.
2. I've removed the non-needed line from the .info file
3. I've moved the uninstall hook to the .install file
4. I've removed the superfluous drupal_uninstall_schema()
Thanks for your support guys. Please review the changes.
Thanks,
Rubens
Comment #5
andrewkamm commentedHi Rubens,
The .info file should be formatted a bit better, mostly just the use of proper capitalization (ex: "MBTiles, "OpenLayers" rather than "mbtiles", "openlayers"). It's also safe (though optional) to remove the quotes from around the values, even ones with whitespace (as long as there are no line breaks in those values). The detailed recommendations for .info files are at http://drupal.org/node/542202.
The .install file has a typo in the
@filecomment ("openalyers"). Also in the .install, the title and description elements in the array returned bymbtiles_for_openlayers_openlayers_layer_types()should be given proper capitalization as noted for the .info file.In your implementation of
hook_uninstall(), you're using SQL anddb_query()to remove variables. You should instead use thevariable_del()function provided by Drupal. Your query searches for vars starting withmbtiles_for_openlayers_, and you can replicate that behavior and still useIn your repository, you've got the major version branch (
7.x-1.x) as default, but you should also remove themasterbranch entirely. The process for doing this with a Drupal-hosted project is documented here.I ran the Coder module reviews, and everything came back clean.
I was able to create a new MBTiles layer and use it on a new map without a problem, except that the map tiles don't show up for me -- however, I'm assuming that's because I need to have a value set for "Base URL" when defining the MBTiles layer. This is my first time using MBTiles, so I'm guessing I would know what to use there if I was more familiar with it. If there's a public URL that can be plugged in there, let me know and I'll try it out.
Comment #6
bhosmer commentedSetting to needs work.
Comment #7
klausiClosing due to lack of activity. Feel free to reopen if you are still working on this application.
If you reopen this please keep in mind that we are currently quite busy with all the project applications and I can only review projects with a review bonus. Please help me reviewing and I'll take a look at your project right away :-)
Comment #7.0
klausi*Updated for non-maintainers git source