Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load back previously drawn polygons to mapedit map #108

Open
cywhale opened this issue Mar 20, 2020 · 0 comments
Open

Load back previously drawn polygons to mapedit map #108

cywhale opened this issue Mar 20, 2020 · 0 comments

Comments

@cywhale
Copy link

cywhale commented Mar 20, 2020

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant