You are not logged in.

Announcement

*** NOTICE: forum.openstreetmap.org is being retired. Please request a category for your community in the new ones as soon as possible using this process, which will allow you to propose your community moderators.
Please create new topics on the new site at community.openstreetmap.org. We expect the migration of data will take a few weeks, you can follow its progress here.***

#1 2015-05-18 12:03:05

blueshack
Member
Registered: 2015-05-18
Posts: 3

leaflet - geojson-Datei einbinden - marke draggable - possible?

Hi

I'm using Leaflet 0.7
I get some Markers with Ajax to display on the map.
Works fine.

But I want each marker draggable.
Can I define this on import - in the datafile?

The Datafile looks like:

{"type": "FeatureCollection", 
"features": [{ 
"type": "Feature",
 "id": 6,
 "properties": { 
"draggable":"true",
"Location":"Location6",
"LOCATION_STREET_NAME":"LOCATION_STREET_NAMEiiii",
"OPEN_DT":"OPEN_DT6"
 },
 "geometry": { 
"type": "Point",
 "coordinates": [ 11.3,47.3]
},
 "draggable": "true"
 },{ 
"type": "Feature",
 "id": 7,
 "properties": { 
"draggable":"true",
"Location":"Location7",
"LOCATION_STREET_NAME":"LOCATION_STREET_NAMEfffffffffffffff",
"OPEN_DT":"OPEN_DT7"
 },
 "geometry": { 
"type": "Point",
 "coordinates": [ 11.35,47.25]
},
 "draggable": "true"
 }]}

I import this File with:

L.geoJson(data).addTo(map);

Thank you.

Offline

#2 2015-05-18 12:16:30

Harald Hartmann
Member
From: 98667 Schönbrunn
Registered: 2014-04-02
Posts: 3,123
Website

Re: leaflet - geojson-Datei einbinden - marke draggable - possible?

Leaflet Forum should be the place to ask this question ... which is already answered asked:
GeoJson - Leaflet - Draggable Makrer --> Geojson

Last edited by Harald Hartmann (2015-05-18 12:21:19)


Mein aktives Gebiet: Gemeinde Schleusegrund
Fingerprint meines Schlüssels: 71F7 3CD9 B647 9079 6B88 326E 8B8B 72AE 34F9 5AAD

Offline

Board footer

Powered by FluxBB