Ticket #2143 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

Ticket to track RFC 31 developments

Reported by: sdlime Owned by: sdlime
Priority: normal Milestone: 5.0 release
Component: MapServer C Library Version: 5.0
Severity: normal Keywords:
Cc:

Description

This development refers to the effort to add methods to update objects using string representations of mapfile snippets. The result will be:

1) a series of methods added to mapscript to allow this 2) a revamped URL configuration capability that allows users to pass snippets (albeit with limited options)

Tasks:

  • update loadObject (e.g. loadLayer) functions to allow tokens that define the object in parsing. Normally those would be stripped by parent loaders but string updates can bypass those. (DONE)
  • write loadObjectFromString wrappers
  • reference loadObjectFromString wrappers in MapScript?
  • remove loadObjectValue functions
  • re-write msLoadMapParameter as msLoadMapFromURL, function will call the loadObjectFromString functions
  • implement parameter to toggle URL configuration
  • documentation

Steve

Change History

Changed 5 years ago by sdlime

  • status changed from new to assigned

Ok, I got the initial code (95% complete) in tonite. All the update object from string methods are present in mapfile.c and are exposed in SWIG/MapScript via updateFromString methods for each object. I've tested via perl with no problems. I've also tested the most frequent URL-based configurations:

  • adding features
  • modifying class or style colors etc...
  • mucking with scalebar look and feel

URL configuration is very limited as one might expect.

To do:

  • PHP/MapScript methods need to be added
  • need to add check to actually enable URL configs

Steve

Changed 5 years ago by dmorissette

The build was broken by the changes from r6361. I made the following changes in r6364:

- Added MS_TOKENIZE_VALUE, MS_TOKENIZE_NAME to enum MS_LEXER_STATES in mapfile.h

- Commented out call to undefined msUpdateMapFromURL() in mapserv.c. Steve: you'll have to remove the comment when you commit the new function.

Changed 5 years ago by sdlime

S**t. I forgot to include my copy of mapfile.h. Will fix. That function (msUpdateMapFromURL) is in mapfile.c but musn't be referenced in map.h. Will fix ASAP...

Steve

Changed 5 years ago by sdlime

Looks like I missed mapfile.c too (big mistake). I guess it was way too late...

Steve

Changed 5 years ago by sdlime

  • status changed from assigned to closed
  • resolution set to fixed

Calling this complete. Other bugs may crop up but will manifest themselves as new tickets.

Steve

Note: See TracTickets for help on using tickets.