Changing the mapfile

classic Classic list List threaded Threaded
2 messages Options
pje
Reply | Threaded
Open this post in threaded view
|

Changing the mapfile

pje
Hi,

I need to change the data of a layer based on a parameter. So, I'm generating the mapfile dinamically and setting it by mySetMap('mapfile_tmp'). The problem is if i change the data and set the mapfile with the same name, the layer didn't change.

Example:

MapfileA

map
    layer
        connectiontype POSTGIS
        data "the_geom from table"
        ...
    end
end

Then i change the mapfile to:

map
    layer
        connectiontype POSTGIS
        data "the_geom from table where column = 'foo' "
        ...
    end
end

And I set the mapfile mySetMap('MapfileA').

What I'm doing wrong?

What i need to do is to change the data of a layer when an user make a search.

_______________________________________________
ka-Map-users mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/ka-map-users
Reply | Threaded
Open this post in threaded view
|

Re: Changing the mapfile

Yamaju
Hi Pje,
 
I think what's happening is the tile images in the kacache directory are not invalidated when the mapfile switches.
If we invalidate the tile images, however, not only the user who performed the search but also all other users will get the changed tile images.
How about highlighting searched features with kaXMLOverlay?
 
Junya
----- Original Message -----
Sent: Tuesday, November 07, 2006 1:03 AM
Subject: [ka-Map-users] Changing the mapfile

Hi,

I need to change the data of a layer based on a parameter. So, I'm generating the mapfile dinamically and setting it by mySetMap('mapfile_tmp'). The problem is if i change the data and set the mapfile with the same name, the layer didn't change.

Example:

MapfileA

map
    layer
        connectiontype POSTGIS
        data "the_geom from table"
        ...
    end
end

Then i change the mapfile to:

map
    layer
        connectiontype POSTGIS
        data "the_geom from table where column = 'foo' "
        ...
    end
end

And I set the mapfile mySetMap('MapfileA').

What I'm doing wrong?

What i need to do is to change the data of a layer when an user make a search.


_______________________________________________
ka-Map-users mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/ka-map-users

_______________________________________________
ka-Map-users mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/ka-map-users