View source: R/osmapi_map_notes.R
osm_search_notes | R Documentation |
Returns notes that match the specified query. If no query is provided, the most recently updated notes are returned.
osm_search_notes(
q,
user,
bbox,
from,
to,
closed = 7,
sort = c("updated_at", "created_at"),
order = c("newest", "oldest"),
limit = getOption("osmapir.api_capabilities")$api$notes["default_query_limit"],
format = c("R", "sf", "xml", "rss", "json", "gpx")
)
q |
Text search query, matching either note text or comments. |
user |
Search for notes which the given user interacted with. The value can be the user id ( |
bbox |
Search area expressed as a string or a numeric vector of 4 coordinates of a valid bounding box
( |
from |
Beginning date range for |
to |
End date range for |
closed |
Specifies the number of days a note needs to be closed to no longer be returned. A value of 0 means only open notes are returned. A value of -1 means all notes are returned. 7 is the default. |
sort |
Sort results by creation ( |
order |
Sorting order. |
limit |
Maximum number of results between 1 and 10000 (may change, see |
format |
Format of the the returned list of notes. Can be |
The notes will be ordered by the date of their last change, the most recent one will be first.
If format = "R"
, returns a data frame with one map note per row. If format = "sf"
, returns a sf
object from
sf. If format = "json"
, returns a list with the json structure. For format
in "xml"
, "rss"
, and
"gpx"
, a xml2::xml_document with the corresponding format.
Other get notes' functions:
osm_feed_notes()
,
osm_get_notes()
,
osm_read_bbox_notes()
notes <- osm_search_notes(
q = "POI", bbox = "0.1594133,40.5229822,3.3222508,42.8615226",
from = "2017-10-01", to = "2018-10-27T15:27A", limit = 10
)
notes
my_notes <- osm_search_notes(
user = "jmaspons", bbox = c(-0.1594133, 40.5229822, 3.322251, 42.861523),
closed = -1, format = "json"
)
my_notes
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.