node-mapserv icon indicating copy to clipboard operation
node-mapserv copied to clipboard

Allow `Map` instances to be updated from mapfile snippets

Open homme opened this issue 11 years ago • 0 comments

Although individual mapserv requests can change map file parameters via a form or a URL there is currently no way to permanently update a live Map instance.

To remedy this whilst adhering to the declarative spirit of the module, an asynchronous updateFromString() method would need to be added to the Map class. This would wrap the underlying mapserver msUpdateMapFromURL() function which implements the CGI mapserver functionality described above. As such the function would take two string parameters; the first specifying the object to update using the mapfile object notation and the second specifying the actual mapfile snippet.

As msUpdateMapFromURL() is not thread safe a call to it would need to be wrapped with a parser lock:

msAcquireLock( TLOCK_PARSER );
msUpdateMapFromURL(...);
msReleaseLock( TLOCK_PARSER );

homme avatar Mar 18 '13 14:03 homme