Forum OpenACS Development: Re: New package: MAPS (Google Maps integration)

Posted by Eduardo Santos on
Hi Malte,

Sorry. We have a lack of documentation that should be solved soon.

The map information is really a tricky thing, but it's not hard to understand. The map is based in two objects: maps and position. Avery time you create a package instance, a new map is created, and this map can have as many positions as you want.

The package is designed to think that you are going to mount the map somewhere and include it in another place. Let's say that you you mount it under /maps: a new map_id will be created for this instance. You are going to include this map_id in any other you want to.

So, what you have to do is:

1 - Create the callback for your object_type. It's pretty simple: it should only supply some info that is specific for this object and we use it when we are maping. I guess this part of documentation is OK.

2 - Include the page /maps/lib/position-view with the maping object_id, return_url and map_id (we have to find a better way to discover this map_id) in the page that you edit the object information. In organizations package, for example, the information page should be organizations/www/one and object_id should be organization_id. This page will show the object's individual position.

3 - Include the page /maps/lib/map-view supplying the map_id (again, there must be a clever way to do it) and you can see all the positions in this map.

I recommend you to run a svn export right now, because we have done a lot of improvements in the last few hours. Let me know if there's any other thing you want to know, so we can put it back in the documentation.

I hope it's useful. :)