Pedro Prez's plugins:
This plugin allows you to geoposicionate every object/user/group on elgg.
You will not need to install another plugin to make it works, you just have to enable it like another normal plugin.
Features:
-Autogeopositioning,
-The possibility of geopositionate the groups and any elgg object.
-If a group or an object is not geopositionated then that object is going to take the user owner possition.
Here some more information about it:
** INSTALLATION **
* Unzip the file to the elgg/mods/ directory.
* Go to your Elgg tools administration section, find the new tool, and
enable it.
* Get an API key from Google Map (if you don't have one) http://code.google.com/apis/maps/signup.html
* Enter the API key on the administration tools plugin settings.
* Enjoy.
** TO KEEP IN MIND **
* The plugin is enable by default for users and groups, but to make it work in objects (files, blogposts, pages)
there is something else to do, we have to:
* On "start.php" under "geolocation_pagesetup" function, then will look for $allowed_contexts and we add to
the array the context where we will add, edit, and show the objects.
As an example, for the file plugin we add, edit and show the objects on the same context, file.
* This is an example to show up how to modify a view file from the file plugin, this will enable the geolocalization of object furthermore than getting the owners geolocalization.
file:mod/file/views/default/file/upload.php
//Show the map for geotagging
if (isset($vars['entity'])) {
$entity = $vars['entity'];
}
$form_body .= "<p>";
$form_body .= "<label>" . elgg_echo('location') . "</label>";
$form_body .= elgg_view('input/geomap', array(
'value' => $location,
'classname' => 'register_map',
'entity' => $entity
));
$form_body .= "</p>";
echo $form_body;
*This is to draw the map on the object view.
file:mod/file/views/default/object/file.php
echo "<p>" . elgg_echo('location') . "<p>";
echo elgg_view('output/geomap', array('value' => $location, 'entity' => $file));
** TODO **
* Profile manager support.
* Site access support.
** CHANGES **
v0.1b (2010-01-29)
* First beta release.
Comments
Looks good m8. Will give it a spin
Ok i have tried it on 1.6.1 both with profile manager plugin on and off. When it is off things work as they should.
When i turn it on though it is a different matter since this plugin doesn't show the maps in profiles anymore.So it got me thinking.Could we geotag the avatar / profile picture in profile?That way we could have both the custom fields and geotagging. Is there an easier way or should i try to work something on that ?
Thanks
Pedro, I just uploaded a new version of vazco_gmap plugin that has a quite similar functionalities to your plugin, it's available here. It has support for profile manager and forms plugin (and is dependant on them, so offers something a bit different than your plugin)
Nice plugin, but not working with site_access plugin. ;-(
Well vazco, dont forget your pugin is paid, so let people try it out. We all need good geolocation for free...
Martinez, the vazco_gmap plugin offers all geolocation functions for free in GPL version. The paid version is required only when you want to use the map of entities and additional functionalities.
@Pedro: I tried editing the start.php to add another plugin to the array and got this error message:
Hello all, sorry for the delay of this replay:
@Nikolas Dovrolis profile manager issue, well this is something that must be done (profile manager support) so I will put it to the todo list.
@Alex the same for the site access plugin.
@Lawrence and about it, mmm.. I searched that message into elgg and I didnt find it, I think it is a php error and not a elgg error.
Regards and thanks for your comments.
I also would like you comment which features or functionalities you would like this plugin has.
Thanks.
hi pedro!
is it possible to geoposicionate only users (and not groups?)
Hello @oma,
Yes it is possible, you have to modificate the start.php. In a future version you would be able to select what to geoposicionate ;)
Thanks for you comment.
Regards.
I'm having trouble with this module, I'm Elgg version 1.6.1
Soon after activating the module, and state my key googple map, if I try to register new users to the page is blank.
Page: / account / register.php
Nor can create new groups of users page is also blank.
Will have settings to do?
Great work. Have you considered using MySQL built in GIS capabilities? See http://dev.mysql.com/doc/refman/5.0/en/spatial-extensions.html
It would require another table that includes the GUID and the geometry. However, it would allow to have much more powerful query, such as find objects related to points within a given area.
fieldtypedescriptionguidBIGINT(20) UNSIGNEDthe id from the entities tablegeomGEOMETRYthe geometry
Indeed in 1.6.1 it breaks the creation of new groups
I have a problem. In profile page do not display map. Only text: 'Output map' Any ideas?
@bernardo Did you try it in a out of the box elgg installation? or did you try with a site that already have maybe you can start desabling the modules to know if the problem is with the geolocation module or with another module.
@Tom I will check it out.
@moot when I have some time I will take a look.
@fizzler maybe your problem is with the google maps API Key, did you check it?
Thanks a lot for your comments.
Hi Pedro, I just installed your plugin in a fresh Elgg 1.7 and I got a "Error reading XML" when I go to edit profile. It's this a support issue?
Thanks!
Hi Pedro,
I have your Plugin running on a fresh 1.7.4 - works perfectly! Thank you for the good work!
Best regards,
Tobias
Installed ok but only shows map on the 'inside' the profile (edit profile) but not on the outside (public) of the profile.
Also adds a location field to signup form, conflicts with captcha.
@Nikolas Dovrolis profile manager issue, well this is something that must be done (profile manager support) so I will put it to the todo list.
Hi - I have made the Profile Manager the first entry in the tools list, and this *seems* to have fixed the conflict with the Geolocation module. My Geolocation module is second from the bottom of the list.
ANyway - how would I either not tag things, or let people tag as New Zealand, or World, and have a higher altitude view for the map?
Hi pedro, when you ll have time to develop the new version? the profile manager issue doesn t let many people use yur great plugin. By the way has anyone fix it by himself?
Hi Pedro :)
I did get work more or lest the map on profile manager with:
Adding :
on profile_manager/views/default/profile/edit.php line 300
and show me the form map on edit profile and show the map on profile, but i dont get user location yet :s
some help?
please help me in converting this plugin so that it works on Elgg 1.8.
Iepa Pedro! Estoy como @zenin deseando la versión para 1.8.8
Llevo 2 dias en esto de elgg, han sido infinidad de problemas, reinstalaciones, poco sueño...
Si estás desarrollandola para esta versión, te lo agradezco, sino sugiero ayuda para hacerlo yo.
Gracias
---------
Hi Pedro! I'm like zenin, waitting for the 1.8.8 version.
I am only for 2 days here, and it has been very problematic. If you are developing it, thanks, else i need help to make it.
Thanks