Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
After updating to the 6.x-1.0 version (released on 2011-Jul-27) The Activate Editing and Deactivate Editing buttons are not visible. The reason seems to be this piece of code:
/**
* Function that includes the Activate/Deactivate editing mode control if it is enabled
* @param $field
* @param $map
*/
function addEditionControl($field, $map){
if(!empty($field['widget']['mapstraction_cck']['controls']['show_edition']))return '<div id="'. $map['id'] .'-activate-edition" class="mapstraction-cck-edition-control-active" rel="'. $map['id'] .'" active="false" edition-active="'.t('Deactivate Editing').'" edition-inactive="'.t('Activate Editing').'">'. t('Activate Editing') .'</div>';
else return "";
}
...in the mapstraction_cck.theme.inc file. Is there a way to enable the button? The comment above the quoted code would indicate that this might be the case, but I do not see the interface to do so anywhere.
Thank you
Comment | File | Size | Author |
---|---|---|---|
#4 | Picture 4.png | 93.29 KB | sano |
#4 | Picture 5.png | 149.39 KB | sano |
#3 | mapstraction_cck_controls config.png | 36.2 KB | plopesc |
missingButton.png | 682.72 KB | sano |
Comments
Comment #1
plopescHello sano
Last Mapstraction CCK changes included an option that allows to hide the Editing button and include the reset map button.
Did you configure that options in your Mapstraction CCK field config page?
I've made some tests and it works fine for me.
Thanks for your interest in the module.
Regards
Comment #2
sano CreditAttribution: sano commentedHi,
As I am writing in the original post. I do not see an interface to set visibility of that button. Can you please tell me where to look for it or include a screen shot of the screen?
Thank you
Comment #3
plopescHello
In the Field config page you can find the "Widget Controls" fieldset, where you can configure the Map controls behavior.
I'm attaching a screenshot from my local environment.
Regards
Comment #4
sano CreditAttribution: sano commentedHmm, I still can't locate the screen where the "Widget Controls" fieldset is placed. I checked the Mapstraction Map field for the content type where I have the map, but do not see it there (see attached Picture 4.png). I also checked the Mapstraction CCK page on the Administer > Site configuration page and it is not there either (see attached Picture 5.png). Finally, I searched for the string "Administrator can customize" that I can see on the screenshot you attached, but Drupal is not finding it anywhere.
Thank you.
Comment #5
plopescHello.
Check your source code, please. It could be not synchronized with git repository.
You can view in http://drupalcode.org/project/mapstraction_cck.git/blob/b7fe9d1421aaab41... that the string you were looking for is included in the includes/mapstracton_cck.inc file
The fieldset is in the administration field page, where you can configure other field settings as provider or zoom level.
Regards
Comment #6
plopescHelo
After view your screenshot. I found that you must include the patch in the geo_field module provided in issue #640492: hook_gis_input info() and widgets issues. That patch allows to configure the widget.
Regards.
Comment #7
sano CreditAttribution: sano commentedHi,
It looks like the patch is for the "geo" module, not the geo-field module. The file path in the patch seems to confirm my "theory":
RCS file: /cvs/drupal-contrib/contributions/modules/geo/modules/geo_field/geo_field.module,v
However, it looks like I have a newer version of the geo_field.module file where the patched segment seems to be in a different place. I am using geo module version 6.x-1.0-alpha5 and I see the following code starting on line 158:
Could you please advise what should I do?
Thank you
Comment #8
plopescHello
As I said, the patch is for the geo_field module, given that is the geo_field.info file where you have to make the changes. Geo_field is a Geo's submodule.
The given patch includes a complete hook implementation. Then, you can put that function where you prefer, while you will include it in that file.
Paste that code (is the same as I included in the patch) in the geo_field.module file:
Regards
Comment #9
sano CreditAttribution: sano commentedI ended up pasting the patch code into the geo_field.module (not the geo_field.info) file and now the Map Settings section is visible on the Mapstraction Map Widget type field page.
Now I can also set a default viewport and zoom for the map - a great improvement.
Thank you.
Comment #10
plopescHello
I'm glad that you were able to enable the map config form. Then, that features were availables since the Mapstraction CCK module was released more than one year ago. That patch was always exposed in the project page and in the documentation page.
Thank you and thanks for your interest in the module.
Regards