Search code examples
javascripttypescriptionic-frameworkionic3angular2-google-maps

how to add Dragable marker for Angular2-google-maps in ionic application


I have implemented Angulatr2-google-maps in my application with an autocomplete search for location but that's not good to go for me I want that the marker could be dragged or moved and placed to the exact location but I am stuck as nothing works for me here.

<sebm-google-map id="map" [latitude]="map.lat" [longitude]="map.lng" [zoom]="map.zoom" >
    <sebm-google-map-marker [latitude]="map.lat" [longitude]="map.lng">
        <sebm-google-map-info-window>
            <strong>My location</strong>
        </sebm-google-map-info-window>
    </sebm-google-map-marker>
</sebm-google-map>

Solution

  •   <sebm-google-map-marker [latitude]="map.lat" [longitude]="map.lng" 
      [markerDraggable]="true" >
    

    Setting marker draggable as true helped me to freely move the marker to any point on the map..