Just for reference I have hacked about with this a bit at the following 
link:

https://github.com/DonaldMcC/w2p_location_widget

It now provides an example app with  reverse geocoding, ability to pickup 
users location per html5 and a method of working with non-geospatial 
databases by moving the result to separate latitude and longitude - however 
some of that is not strictly plugin and would need a bit more 
incorporation.  Doubtless there are better ways of doing this but as far as 
I can see what is there does work.

Donald

On Friday, August 15, 2014 at 4:52:57 AM UTC+1, Leonel Câmara wrote:
>
> In 12 hours or so I'm going on a week long vacation, before I go, I 
> thought this could be useful to some people here, even if just as an 
> example, now that the DAL supports geo stuff.
>
> This small plugin provides a location picker and a validator for geometry 
> (NOT geography) fields that actually represent real points on the map.
>
> The usage is quite simple and here's an example:
>
> from plugin_location_picker import location_widget, IS_GEOLOCATION
>
> db.define_table('point',
>     Field('name'),
>     Field('coord', 'geometry()', requires=IS_GEOLOCATION(), 
> widget=location_widget())
> )
>
> Here's a more complex example that makes the map start in the center of 
> Lisbon (Everyone should use this):
>
> from plugin_location_picker import location_widget, IS_GEOLOCATION
>
> db.define_table('point',
>     Field('name'),
>     Field('coord', 'geometry()', requires=IS_GEOLOCATION(), 
> widget=location_widget(map_options={'center': {'lat': 38.725275, 'lng': 
> -9.150028}}, marker_options={'position': {'lat': 38.725275, 'lng': 
> -9.150028}}))
> )
>
> Finally, go to appadmin and add points to your point table, verify that 
> you now have an awesome widget (well the bootstrap 3 classes probably need 
> improvement so the appearance may be odd).
>
> Also, remember to make sure your backend is one of those supported by the 
> geoDAL sqlite/spatialite postgres/postgis or mssql. I actually only tested 
> this with postgresql and postgis so results may vary.
>
> Respect the BEER-WARE license please.
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to