NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

I am using Overpass-api to request data, then display it in an interactive webpage using Openlayers. When user clicks on some feature, the information is shown in popup.

As of now, the page is working nicely and displays all the tags.

I want to add the "last updated time" of the feature in the popup, which will correspond to the "timestamp" value in the "Overpass-api meta request" but i cannot access that value.

asked 05 Mar '13, 04:56

amritkarma's gravatar image

amritkarma
684212941
accept rate: 11%

1

Can you please give an example query URL?

(05 Mar '13, 05:15) Roland Olbricht

I assume this is not Overpass API specific, but a general issue when reading OSM XML with OpenLayers. Then you could give Format.OSMMeta a try, an extension to Format.OSM I wrote. Not well tested, but worked for me.

Include the file/code in your project and replace references to "OpenLayers.Format.OSM" with "OpenLayers.Format.OSMMeta" in your code.

permanent link

answered 05 Mar '13, 09:49

ikonor's gravatar image

ikonor
1.3k21119
accept rate: 18%

Do you want to contribute that to the main OpenLayers source tree?

(05 Mar '13, 11:57) gormo
1

I plan to, but right now my focus is on making progress with my projects and gather candidates for sharing along the way. Then do some clean up, documentation and tests.

In this case I would like to discuss implementation details first, like: really mix meta info with tags? use a prefix? merge with OSM class? Also, I'm thinking about refactoring the OSM.read method and using one of the implementations for Relation support out there.

(05 Mar '13, 13:57) ikonor
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×483
×199
×122
×23
×18

question asked: 05 Mar '13, 04:56

question was seen: 7,035 times

last updated: 05 Mar '13, 13:57

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum