Skip to content

Load back previously drawn polygons to mapedit map #108

@cywhale

Description

@cywhale

Hi,
I can export drawn objects into sf, or as plain text of geometry, saving it into file, by

  nf <- input[[ns("map_draw_all_features")]]
  drawn_obj <-  <- do.call(rbind,sapply(seq_along(nf$features), function(x) {
    st_sf(id=nf$features[x][[1]]$properties$`_leaflet_id`,
          type=nf$features[x][[1]]$geometry$type,
          geom=sf::st_geometry(mapedit:::st_as_sfc.geo_list(nf$features[x][[1]])),
          crs=st_crs(4326))
  }, simplify=FALSE))

Is there any way to load previously drawn objects into mapedit map back again?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions