GeoTools
  1. GeoTools
  2. GEOT-3565

Use MapContent in GTRenderer and StreamingRenderer

    Details

    • Type: Improvement Improvement
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 8.0-M1
    • Component/s: render
    • Labels:
      None

      Description

      MapContent is advertised in the docs as the class to use in preference to MapContext for new development. The attached patch does the following:

      • adds setMapContent and getMapContent methods to GTRenderer and StreamingRenderer
      • replaces the MapContext instance in StreamingRenderer with a MapContent instance
      • deprecates setContext and getContext methods
      1. combined_mega_patch.patch
        67 kB
        Andrea Aime
      2. combined_mega_patch.patch
        88 kB
        Jody Garnett
      3. combined-renderer-mapcontent.patch
        16 kB
        Michael Bedward
      4. GEOT-3565-aaime.patch
        21 kB
        Andrea Aime
      5. GEOT-3565-context-fix.patch
        62 kB
        Andrea Aime
      6. mega_patch.patch
        34 kB
        Jody Garnett
      7. renderer-mapcontent.patch
        14 kB
        Michael Bedward
      8. renderer-mapcontent2.patch
        14 kB
        Michael Bedward
      9. shapefile-renderer-mapcontent.patch
        2 kB
        Michael Bedward

        Issue Links

          Activity

          Hide
          Andrea Aime added a comment -
          Hi Jody, did you also prepare an equivalent patch for GeoServer?
          To evaluate the updated set of classes for good the only realistic way is to switch something that uses them heavily, you have seen the amount of chaos the previous set of classes caused.
          Btw, the patch you attached has a ton of commented out blocks and a number of unrelated changes that are probably due to encoding issues, those need cleaning up.
          Show
          Andrea Aime added a comment - Hi Jody, did you also prepare an equivalent patch for GeoServer? To evaluate the updated set of classes for good the only realistic way is to switch something that uses them heavily, you have seen the amount of chaos the previous set of classes caused. Btw, the patch you attached has a ton of commented out blocks and a number of unrelated changes that are probably due to encoding issues, those need cleaning up.
          Hide
          Andrea Aime added a comment -
          Btw, I can re-try doing the geoserver patch, just want to make sure I'm not throwing away a day duplicating work you might have already done
          Show
          Andrea Aime added a comment - Btw, I can re-try doing the geoserver patch, just want to make sure I'm not throwing away a day duplicating work you might have already done
          Hide
          Andrea Aime added a comment -
          Replacing the combined mega patch with a cleaned up one
          Show
          Andrea Aime added a comment - Replacing the combined mega patch with a cleaned up one
          Hide
          Andrea Aime added a comment -
          This one fixes a mistake in the previous patches: if one sets a map context using setContext(), getContext() must return the same object, there is no guarantee it's goind go be a plain MapContext(), in the case of GEoServer it's a subclass with extra infos
          Show
          Andrea Aime added a comment - This one fixes a mistake in the previous patches: if one sets a map context using setContext(), getContext() must return the same object, there is no guarantee it's goind go be a plain MapContext(), in the case of GEoServer it's a subclass with extra infos
          Hide
          Andrea Aime added a comment -
          Patch finally applied, whew
          Show
          Andrea Aime added a comment - Patch finally applied, whew

            People

            • Assignee:
              Andrea Aime
              Reporter:
              Michael Bedward
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: