This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Geojson file edit

0

It's ok with following:

{ "type": "Feature", "id": 11, "properties": { "Name": "Atlanta Hawks", "long": -84.396163, "lat": 33.757269 }, "geometry": { "type": "Point", "coordinates": [ -84.396163, 33.757269 ] } }

I am wondering if it can be achieved to make image and text link in the popup so I input something in the properties, like:

{ "type": "Feature", "id": 11, "properties": { "image": "https://upload.wikimedia.org/wikipedia/commons/thumb/e/ef/Cherry_Blossoms_and_Washington_Monument.jpg/320px-Cherry_Blossoms_and_Washington_Monument.jpg",
        "url": "https://en.wikipedia.org/wiki/Washington,_D.C.",
        "marker-symbol": "star",
        "city": "Washington, D.C." }, "geometry": { "type": "Point", "coordinates": [ -84.396163, 33.757269 ] } }

It seems not working and how to fix it, thanks!

asked 26 Mar '14, 22:49

zjmu916's gravatar image

zjmu916
1555
accept rate: 0%

edited 27 Mar '14, 06:33

iii's gravatar image

iii
4.9k84082

1

Sorry -- does this have anything to do with OpenStreetMap?

(26 Mar '14, 23:08) Jonathan Ben...

Same here, what is the goal and what is the problem?
In general, http://www.openlinkmap.org does embedding WP images in it's popup bubbles

(27 Mar '14, 06:35) iii

One Answer:

0

I'm guessing this is a question about using a Geojson file with Mapbox and OSM data (given the tags on the question). This isn't really a question about OSM directly. You'd be better to look for advice elsewhere I think.

I do have some minimal experience in using a geojson file to display information on top of an osm map. Using Leaflet to make this work I had details about the marker symbol and so on outside the geojson file (in the javascript which refers to the file, not in the file itself). Not sure if this will help?

answered 27 Mar '14, 14:30

Rostranimin's gravatar image

Rostranimin
2453412
accept rate: 0%

Source code available on GitHub .