• Resolved bomdiabrasil

    (@bomdiabrasil)


    Hi,

    Is it possible to add an array of marker within one shortcut?

    [leaflet-marker] {marker 1},{marker 2}, … [/leaflet-marker]

    I have a list of about 400 markers that I would like to display as fast as possible.

    Thanks for your help!

    All the best

    Christian

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor hupe13

    (@hupe13)

    leaflet-marker is for one marker only. I suggest to use a php script or put all markers in a geojson file.

    Thread Starter bomdiabrasil

    (@bomdiabrasil)

    Hello Hupe13, Thanks, for your answer!

    This is how I put the code into a wordpress page:

    [leaflet-map lat=53.366944444444 lng=7.2055555555556 zoomcontrol zoom=9 height="600"]
    [leaflet-marker svg color="white" background="red" lat=53.366944444444 lng=7.2055555555556] Emden[/leaflet-marker]
    [leaflet-circle lng=7.2055555555556 lat=53.366944444444 radius=70000 color="#0DC143" fillOpacity=0.1]
    [leaflet-geojson opacity=1.0 src=https://www.bernersennenhund.de/wp-content/uploads/geodaten/berner-sennenhund-zuechter.geojson]

    I tried to show the marker with a geojson file.

    The marker is being displayed, but the popup does not work. Any idea how to show the popup?

    https://www.bernersennenhund.de/berner-sennenhund-zuechter-in-niedersachsen/berner-sennenhund-zuechter-in-emden/

    { "type": "Feature",
        "properties": {
            "name": "Coors Field",
            "amenity": "Baseball Stadium",
            "popupContent": "This is where the Rockies play!"
        },
        "geometry": {
            "type": "Point",
            "coordinates": [7.3, 53.4]
        }
    }
    
    Plugin Contributor hupe13

    (@hupe13)

    Use curly braces {} to display the properties or tableview:

    [leaflet-geojson ....]{name} {popupContent}[/leaflet-geojson]
    [leaflet-geojson .... tableview]name[/leaflet-geojson]

    Example: https://leafext.de/extra/geojsonproperties/

    Thread Starter bomdiabrasil

    (@bomdiabrasil)

    Thanks! That worked fine! ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Multiple Marker with one shortcut?’ is closed to new replies.