[ka-Map-users] map center
Paul Spencer
pspencer at dmsolutions.ca
Fri Mar 17 15:22:21 EST 2006
Kurt,
comments inline
On 17-Mar-06, at 2:53 PM, K Kuo wrote:
> Hi Paul,
> Thank you very much.
> May I ask you few more questions? Please allow me if the questions
> are too basic since this is my first time of using ka-map.
> 1. I am confused about the terms of "mapname" and "map file". I
> quote the comments from config.php as follow:
> "* szMap should be set to the default map file to use but can
> change if
> * this script is called with map=<mapname>.
> */
> $szMap = 'gmap75';"
> As my understanding, the map file is the *.map which is also called
> in aszMapFiles array. Is the default map file the same one which
> used in $aszMapFiles? Does the mapname indicates the cache folder
> as gmap75 shown above, where the image files are stored?
yes, you have it right. There is an array $aszMapFiles that contains
all the configuration for each mapfile that ka-Map knows about.
These are key->value pairs where the map name is the key. The
directory in the kacache is named for the map name.
>
> 2. The cps=centerx,centery,scale you have mentioned is in *.map
> file or has to be specified in config.php file. Can I use longitude
> and longitude and latitude in cps?
Sorry, I wasn't clear. You can load index.html?
map=<mapname>&cps=centerx,centery,scale and these values will be
passed by kaMap to init.php and used instead of the defaults.
You can use the same coordinates as are defined for your map. gmap75
uses an LCC projection which has units in meters, so the coordinates
would need to be in meters. If your map file uses UNITS DD (decimal
degrees) then long/lat would probably work.
>
> 3. I got the same map image when I refresh ka-map after I make
> changes in *.map. I have to delete cache file in order to get the
> new image. Is this because there is no change in config.php file so
> ka-map just grabs the old cache without rendering new images?
kaMap, by default, always considers files in the cache to be
current. There is some ongoing to work to improve this and make it
easier to make changes to your map file in the future.
>
> 4. Is it possible to add a "time lapse" layer upon the basic map
> which generated by ka-map.
> For example the movement of vehicle.
yes. I would ask for opinions for this on the list :) There are a
couple of different ways.
>
> 5. Do you know if there is documentation for ka-map? I am not able
> to find one in maptools.org.
>
no, sadly. There is a wiki and the user list. I am starting to add
API documentation but it would probably not be that useful to you
right now. It is in cvs though.
> Thank you for your time and help.
>
> Regards,
>
> Kurt
>
>
>> From: Paul Spencer <pspencer at dmsolutions.ca>
>> To: "K Kuo" <mtrp36 at hotmail.com>
>> CC: ka-map-users at lists.maptools.org
>> Subject: Re: [ka-Map-users] map center
>> Date: Fri, 17 Mar 2006 07:40:42 -0500
>>
>> Kurt,
>>
>> Do you mean the center of the map when it is first loaded? This
>> is normally controlled by the map file but it is possible to
>> pass parameters to the index.html page to cause it to load at a
>> different set of extents or at a center point and scale.
>>
>> You can pass the following:
>>
>> map=<map name> - loads <map name> instead of the default specified
>> in config.php
>> extents=minx,miny,maxx,maxy - zoom to these extents. kaMap will
>> find the closest scale that completely contains the extents ...
>> this relies on viewport size and may have unintended results
>> cps=centerx,centery,scale - center the map on the given point and
>> set the scale to the given value.
>>
>> All coordinates are in the coordinate system of the map file, no
>> reprojection happens. Scale is one of the pre-defined scale
>> values for the map.
>>
>> Cheers
>>
>> Paul
>>
>> On 17-Mar-06, at 2:36 AM, K Kuo wrote:
>>
>>> Hi,
>>> Is the map center controled by "extent" in map file while
>>> running ka-map? Can map center be variables?
>>> Thanks
>>>
>>> kurt
>>>
>>>
>>> _______________________________________________
>>> ka-Map-users mailing list
>>> ka-Map-users at lists.maptools.org
>>> http://lists.maptools.org/mailman/listinfo/ka-map-users
>>
>> +-----------------------------------------------------------------+
>> |Paul Spencer pspencer at dmsolutions.ca |
>> +-----------------------------------------------------------------+
>> |Applications & Software Development |
>> |DM Solutions Group Inc http://www.dmsolutions.ca/|
>> +-----------------------------------------------------------------+
>>
>>
>>
>>
>
>
+-----------------------------------------------------------------+
|Paul Spencer pspencer at dmsolutions.ca |
+-----------------------------------------------------------------+
|Applications & Software Development |
|DM Solutions Group Inc http://www.dmsolutions.ca/|
+-----------------------------------------------------------------+
More information about the ka-Map-users
mailing list