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

Hi,

Is we do't have facility to add labels which will show some information of markers on page load load itself.

like on page load of map I want to show image with one label, and the label will contain the same information what we have now in popup.

I do't want popup meassage I want label near by marker which will show the image information. I am giving one example http://econym.org.uk/gmap/example_elabel.htm here.

As in above example you can see one label is coming on page load of map which is providing information of the image.

the same above thing i want ot implement in open street map is that is possible?

Please provide me some example if you have.

thanks for your time and support.

Vivek

asked 30 Sep '10, 22:16

Vivek%20Kumar's gravatar image

Vivek Kumar
15345
accept rate: 0%

edited 01 Oct '10, 19:22


Yes, you can show labels on the map in OpenLayers. See this example here: OpenLayers Labeled features example. It shouldn't be too hard to modify that to show an OSM map instead, and change the markers and labels to what you want. You can probably find more details in the OpenLayers Documentation

Alternatively, it is possible to show OSM maps in the Google Maps API. See Google Maps example. So you could modify that example map that you linked, to use OSM maps instead of Google.

permanent link

answered 01 Oct '10, 22:52

Vclaw's gravatar image

Vclaw
9.2k895141
accept rate: 22%

It would help if you provided some more details of what you want to do. ie Do you want a map on your own website? And what do you mean by markers? Places in OSM, or some other waypoints?

The best option is probably to use OpenLayers. This lets you show an OSM map, with markers overlaid, and popups when you click on them. There is a simple example of this here: Openlayers POI layer example. This needs the markers in a tab separated text file, so you will have to convert your markers to that format.

permanent link

answered 01 Oct '10, 16:05

Vclaw's gravatar image

Vclaw
9.2k895141
accept rate: 22%

1

you've created a new answer instead of commenting on Vclaws answer. If you want to add a comment press "add new comment" beside the answer instead of using the form at the bottom of the page saying "your answer"

(01 Oct '10, 18:30) Andy Allan
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:

×59

question asked: 30 Sep '10, 22:16

question was seen: 28,212 times

last updated: 01 Oct '10, 22:52

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