MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    MMM-Google-Route label cleanup help

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    2 Posts 2 Posters 273 Views 2 Watching
    Loading More Posts
    • 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.
    • C Offline
      chief
      last edited by chief

      Hi all, I am setting up a new MM and installed the MMM-Google-Route module. It is working just fine with my api key, but I am trying to remove, resize, or just move the labels/icons that say “Map Data © 2022 Google, Terms of Use, Report a map error”.

      I’ve tried reading the linked mapOptions reference: https://developers.google.com/maps/documentation/javascript/reference/map#MapOptions, but am unable to get the map on the screen to simplify the view to not have those icons overlap on the maps. Any help would be most appreciated!

      1 Reply Last reply Reply Quote 0
      • C Offline
        cabalpaul90
        last edited by

        Hope this will help -

        Using the module
        To use this module, clone this repo to your MagicMirror/modules/ directory.

        git clone https://github.com/mrdis/MMM-google-route.git

        And add the following configuration block to the modules array in the config/config.js file:

        var config = {
        modules: [

            {
                module: 'MMM-google-route',
                position: 'top_left',
                config: {
                    key: '<YOUR_KEY>',
                    directionsRequest:{
                        origin: '<ROUTE START>',
                        destination: '<ROUTE FINISH>'
                    }
                }
            }
        
        ]
        

        }
        Configuration options
        Option Description
        key Required Google api key. See below for help.
        Type: string
        directionsRequest Required The directions to show on the map.
        Type: google.maps.DirectionsRequest interface
        language Directions language
        Type: string
        Default value: en
        title Optional title to show above the map.
        Type: string
        height Height of the map.
        Type: string (pixels)
        Default value: 300px
        width Width of the map.
        Type: string (pixels)
        Default value: 300px
        refreshPeriod Period between API requests. Set to 0 to disable periodic refresh.
        Type: integer (minutes)
        Default value: 1
        minimumRefreshPeriod Set a minimum period between API requests. This is useful when used in combination with listen.
        Type: integer (minutes)
        Default value: 0
        showAge Show how long ago the routes were updated.
        Type: boolean
        Default value: true
        showMap Show the map.
        Type: boolean
        Default value: true
        fontSize Size of the title and routes font. Use a percentage to specify size relative to default.
        HTML DOM Style fontSize property
        Type: string
        Default value: 100%
        mapOptions Map visualization options.
        Type: google.maps.MapOptions interface
        listen Refresh the route when receiving these notifications and use the location contained in the notification as destination (if available).
        Specify the ID of the notifications to listen for.
        Type: string[]
        Default value: []
        Google API Key
        Obtain an api key at Google Developer’s page.

        Google directions service errors
        If “Google directions service status:” error message appears, it means that the request to the Google directions service failed for some reason.

        The list of error codes and their meanings can be found here.

        Importance of correct date/time settings
        If “Google directions service status: INVALID_REQUEST” error message appears, it could be due to an invalid setting of the current date and time on the device that is displaying the mirror interface.

        This is due to the departureTime field of the drivingOptions field passed to the directions API being set to one minute from the current time, and google service checking that this timestamp is in the future. Basically I have using this cloning while developing an app for mobile app development company Using MMM-ModuleScheduler to configure the route refresh interval
        You can use the MMM-ModuleScheduler module to trigger route updates using a certain schedule.
        This may be useful for example to refresh the route more frequently in the morning and less frequently during the rest of the day, reducing the risk of exceeding the query limit set by google.

        Just set “MMM-google-route/refresh” as the notification id in the notification_schedule configuration parameter of the module, e.g.

        {
            module: 'MMM-ModuleScheduler',
            config: {
                notification_schedule: [
                    // Refresh the route every minute from 7:00 AM to 8:00 AM, monday to friday
                    { notification: 'MMM-google-route/refresh', schedule: '* 7 * * 1-5' }
                ]
            }
        },
        
        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post
        Enjoying MagicMirror? Please consider a donation!
        MagicMirror created by Michael Teeuw.
        Forum managed by Sam, technical setup by Karsten.
        This forum is using NodeBB as its core | Contributors
        Contact | Privacy Policy