Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. How to use OpenSeaMap plugin with OpenStreetMap
Forum Updated to NodeBB v4.3 + New Features

How to use OpenSeaMap plugin with OpenStreetMap

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
1 Posts 1 Posters 158 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Aurentiaco
    wrote on last edited by
    #1

    I want to use openseamap for my navigation but I could'nt find any plugin sources do I need to make my own. Do you have any solutions. I am currently using openstreetmap plugin. This is my QmlCode so far
    import QtQuick 2.15
    import QtLocation 5.11
    import QtPositioning 5.11

    Rectangle {
    id: window

    width: 701
    height: 641
    
    property double latitude: 38.4247
    property double longitude: 27.1428
    
    property Component locationmarker: marker
    
    Plugin {
        id: openseamapPlugin
        name: "openseamap"
    }
    
    Map {
        id: mapview
        anchors.fill: parent
        center: QtPositioning.coordinate(latitude, longitude)
        zoomLevel: 5
    
        plugin: openseamapPlugin
    }
    
    function setCenterPosition(lati, longi) {
        mapview.pan(latitude - lati, longitude - longi)
        latitude = lati
        longitude = longi
    }
    
    function setLocationMarking(lati, longi) {
        var item = marker.createObject(window, {
            coordinate: QtPositioning.coordinate(lati, longi)
        })
        mapview.addMapItem(item)
    }
    
    Component {
        id: marker
        MapQuickItem {
            id: markerImg
            anchorPoint.x: image.width / 4
            anchorPoint.y: image.height
            coordinate: position
            sourceItem: Image {
                id: image
                width: 20
                height: 20
                source: "file:///home/eray/Downloads/locationmarker.png"  // Replace with the actual file path
            }
        }
    }
    

    }

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved