[ka-Map-users] External link to control Map scroll & Polygon overla

Daniel Ceregatti daniel at ceregatti.org
Thu Aug 3 13:05:12 EDT 2006

I implement a "radius" in one of my ka-map projects
(http://www.lapdonline.org/crimemap search for something like "150 n.
Los Angeles St." in the address form, leaving the rest as default to see
an example). I had originally tried wz_jsgrpahics, but found it to be a
performance hog. I ended up pre-rendering transparent anti-aliased
circle images in png format from 30 to 1500 pixels in radius and simply
placed these in their own canvas with addObjectGeo. I also
pre-calculated a rough "milesPerPixel" for every scale in my map then
used these figures to overlay the appropriate image file.

If you choose to implement this solution, I'll gladly show my code.


Pg wrote:
> 2006/8/3, Alvin Clay <orionkamap at yahoo.com>:
>> 2) I'd like to draw a semi-transparent circle on the map overlay that
>> has a
>> certain radius and center point. Is there a way in the xmlOverlay to
>> include
>> a polygon that is a circle and has a certain radius in miles?
>> Thanks,
>>  Alvin
> There isn't a pre-cooked function.
> A possible solution is to write a script that calculates the circle
> (approximated with an n-edge polygon) and produces a polygon or
> linestring directive usable by kaXmlOverlay.
> Another solution is to reuse part of the code on kaXmlOverlay
> (particularly the methods kaXmlSymbol.prototype.draw_*) to draw the
> circle with the calculated radius: in this case you have to provide
> the handling for scale changes.
> _______________________________________________
> ka-Map-users mailing list
> ka-Map-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/ka-map-users

More information about the ka-Map-users mailing list