Hello to all kaMap users!<BR>
<b>Background:</b><BR>
I am trying to "port" a project, done with Mapserver and javascript, to kaMap. The program has the functionality to check/uncheck layers and add the data<BR>
dynamically from a database. This is necessary because the data are updated continuously, e.g. vehicle position... <BR><BR>
The processor savings with the caching of tiles mainly influenced my choice to move to kaMap. I lose the map quite often with Mapserver only.<BR><BR>
<b>Question:</b><BR>
I have a sql database server which contains the data for my layers (position etc.). I need to load the data into layers at runtime and update the layers<BR>
continuously. The problem is that although the javascript from init.php show that the layer is added (or at least the correct parameters are inserted) e.g.<BR>
-------------------------------------------------------------------------------------------------------------------------------------------------<BR>
map.addLayer(new _layer( { name:'taxi',visible:true,opacity:100,imageformat:'png',queryable:false,tileSource:'redraw',redrawInterval:10000,refreshInterval:5000,scales: new Array('1','1','1','1','1','1','1','1','1')}));"; <BR>
-------------------------------------------------------------------------------------------------------------------------------------------------<BR>BUT: when I later do a getlayerByName('taxi') in an AJAX called php file to load the data, which is called every 2s, the layer does not exist.<BR><BR>
Here is my layer in the mapfile:<BR>
<BR>
-------------------------------------------------------------------------------------------------------------------------------------------------
<BR>#####################################################
# Unit layer could be a Vehicle or Dispensing unit<BR>
<BR>
LAYER<BR>
NAME "taxi"<BR>
GROUP "taxi"<BR>
STATUS ON<BR>
DATA "missing"<BR>
METADATA<BR>
"tile_source" "redraw"<BR>
"redraw_interval" "10000"<BR>
"refresh_interval" "5000"<BR>
END<BR>
TYPE point<BR>
LABELCACHE on<BR>
CLASS<BR>
SYMBOL "Taxi"<BR>
SIZE 30<BR>
STYLE<BR>
COLOR -1 0 0<BR>
END<BR>
TEXT ""<BR>
LABEL<BR>
BUFFER 20<BR>
TYPE Truetype<BR>
FONT "arial"<BR>
SIZE 8<BR>
POSITION uc<BR>
COLOR 0 0 0<BR>
ANGLE AUTO <BR>
END<BR>
END<BR>
END<BR>
-------------------------------------------------------------------------------------------------------------------------------------------------
<BR><BR>
I tried to use KaXmlOverlay, which worked OK, but<BR>
-> I already have code for an overlib imagemap, for tooltip and click menu,<BR>
-> support for the overlay tooltip is lacking, and<BR>
-> overlays can't be switched on/off with usual layer checking.<BR>
<BR>
I need this to work or my motivation for using kaMap would be nullified,<BR>
Any help will be much appreciated!<BR>
<BR>
Schalk Snyman
<br><hr align="left" width="300">
View this message in context: <a href="http://www.nabble.com/Loading-layer-data-dynamically-in-kaMap-tf3473567.html#a9693877">Loading layer data dynamically in kaMap</a><br>
Sent from the <a href="http://www.nabble.com/ka-map-users-f16515.html">ka-map-users mailing list archive</a> at Nabble.com.<br>