[Community] Zoom level, portlet and AT Proxy features
sgillies at frii.com
Wed Apr 19 20:43:47 EEST 2006
No need to apologize for the maps. PCL itself has not yet become the
perfect swan either :)
Improvements are very welcome! The way to go about it is to create a
new feature enhancement ticket under the GeoAware component
Give us some contact info, a good description of the use case, and
the code modification. Attach a patch if you can, the output of "diff
-u" vs the code trunk is ideal, but a patch to the most recent
release is good enough.
Seems like we should get you set up with wiki access too. If you're
interested, send an email to the address at the bottom of http://
trac.gispython.org/projects/PCL/wiki/GetInvolved and we will get that
On Apr 19, 2006, at 10:38 AM, Chris Matheson wrote:
> Hi Eveyone
> Thanks Kai, your suggestion worked.
> I did this...
> On my set-up I added a new "zoomlevel" field to the
> GeoArchetypesProxy and PrimaGISDataLayer schemas, and then set up
> the portlet template to use these fields. That way we can either
> set a default zoomlevel for the layer or specific zoomlevel for
> These are some examples...
> feature zoomlevel of 1,000m - http://www.centralfrontenac.com/yc/
> township/office layer zoomlevel of 5,000m - http://
> main map, please excuse it's looks, it is an "ugly duckling", with
> time and work it will get better - http://www.centralfrontenac.com/
> I am willing to share these changes with anyone, or learn the
> contribution process and do properly if you think it would be a
> good feature.
> Thanks again and best wishes to everyone.
> Chris Matheson
> Kai Hänninen wrote:
>> Hi Chris
>> Chris Matheson wrote:
>>> Hello everyone
>>> I'm new to PrimaGIS and the group. I'm using PrimaGIS 0.5.0 and
>>> have a question specific to AT Proxy features. I would like to
>>> be able to set the zoom level for the returned map, when the map
>>> link is followed from a subject object via the primagis
>>> portlet.. Currently, on my installation, when such a link is
>>> followed from the feature is centred and the zoom level seems to
>>> be either the last zoom level or the zoom level of the default
>>> view. I would love some insight into this and possibly a solution.
>> Here's one thing you can try. If you take a look at the
>> portlet_primagis.pt template that provides the porlet, you can see
>> that it generates a following kind of link back to the map
>> which essentially just gives a point where the map is centered and
>> then PrimaGIS uses the extent (zoom level) in the current user's
>> PrimaGIS also allows you to specify the map extent directly in the
>> link, so using something like:
>> you can make the map zoomed into a specific map extent, defined by
>> the values MINX, MINY, MAXX and MAXY (which much be replaced with
>> actual values).
>> Your proxy objects will only contain POINT geometries, but it will
>> be easy to expand the point for a given amount of spatial units to
>> get the appropriate map extent (zoom level) you wish to achieve,
>> minx, miny, maxx, maxy = x - dx, y - dy, x + dx, y + dy
>> where x and y are the proxy's coordinates and dx and dy the amount
>> of spatial units you wish to display around the point. Note that
>> PrimaGIS automatically normalizes the extent you pass it, so if
>> the extent has a different height-to-width ratio, then it will be
>> modified slightly to maintain the ratio with the map image size.
>> This is nothing you need to worry about yourself though :)
>> You can try this by simply customizing portlet_primagis.pt and
>> replacing the part where the link back to the map is generated
>> with the example above.
>> Hope this helps!
>>> Chris Matheson
>>> P.S. I love PrimaGIS!
>> Glad to hear :)
> Community mailing list
> Community at lists.gispython.org
More information about the Community