Announcement

Collapse
No announcement yet.

Maps API configuration

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Maps API configuration

    I may support different Map APIs as required.

    Please let me know which API you require, i.e if you find free Maps API

    Note: The location reported by Traccar server can be noisy - even if device is not moving - it still reports changes. Which causes unnecessary Maps API request (can cause unnecessary charges, especially from Google).

    In ver 4.0.0.33 I added a lot of functionality to help avoid this, please read about adjusting the plugin settings:

    https://forums.homeseer.com/forum/hs...ange-detection

    #2
    Configure Google Maps API

    Instructions from Get the API key, but with more detailed explanation.

    1. Create Google account if you don't have one.

    2. Go to the Google Cloud Console

    3. Create a new project - name is not important (or select existing project)

    Click image for larger version  Name:	Screenshot 2021-03-29 153634.jpg Views:	0 Size:	22.3 KB ID:	1465854

    4. Once project is created - on "Maps APIs and Services" page select "Maps Static API", on next page click "Enable" button

    Click image for larger version  Name:	2021-03-29 (2).png Views:	0 Size:	29.9 KB ID:	1465855

    Note: if reverse geocoding is required (for getting street address from coordinates) - also enable Geocoding API
    Note: if Street View is required - also enable StreetView API

    Click image for larger version

Name:	APIs.jpg
Views:	35
Size:	49.5 KB
ID:	1467904

    5. Select "Credentials" and click "Credentials in APIs & Services" link:

    Click image for larger version  Name:	2021-03-29 (3).png Views:	0 Size:	45.6 KB ID:	1465856

    6. Click "CREATE CREDENTIALS", select "API key" - then copy and save the generated key

    Click image for larger version  Name:	2021-03-29 (5).png Views:	0 Size:	46.0 KB ID:	1465857

    7. You need to create billing account (if you don't have one) and link it to the created project. For help see https://cloud.google.com/billing/doc...illing-account

    a. Go to https://console.cloud.google.com/billing
    b. Click Create account
    c. Follow the screens (i.e. Set up your billing profile, click Submit and enable billing)
    d. Go to https://console.cloud.google.com/pro...billing/enable and enable billing for this project (select the created billing account)

    Comment


      #3
      Configure Bing Maps

      1. https://www.bingmapsportal.com/Account/Register
      2. https://www.bingmapsportal.com/Application
      Application type: Windows Application


      Configure Geoapify Maps

      1. https://www.geoapify.com/pricing
      2. Create a project and generate an API key


      Configure LocationIQ Maps

      1. Pricing - LocationIQ - Free & Fast Geocoding and Reverse Geocoding service - select Free Trial
      2. https://my.locationiq.com/dashboard API Key is available at "API Access Tokens" menu

      Comment


        #4
        think I got too many and haven't figured out how to remove unwanted...


        Ubuntu on the Intel NUC ( 8i5BEK ), 32 G, 250G SSD, V4 Pro 😎

        Comment


          #5
          Click image for larger version

Name:	api.JPG
Views:	64
Size:	45.2 KB
ID:	1466815
          Ubuntu on the Intel NUC ( 8i5BEK ), 32 G, 250G SSD, V4 Pro 😎

          Comment


            #6
            Click image for larger version

Name:	google 1.JPG
Views:	51
Size:	23.2 KB
ID:	1466817

            here is my current output, Problem may ( probably ) be with cfg file that I had previously set up for Google
            Let me know if you need to see a copy and I will e-mail to you for corrections

            Geary
            Ubuntu on the Intel NUC ( 8i5BEK ), 32 G, 250G SSD, V4 Pro 😎

            Comment


              #7
              I'm not sure exactly what you did? Please post maps config screenshot.

              Comment


                #8
                Click image for larger version

Name:	traccar12.JPG
Views:	50
Size:	69.6 KB
ID:	1466821 I see this error in the log
                is the text supposed to be "URL, url" or URI ??
                Ubuntu on the Intel NUC ( 8i5BEK ), 32 G, 250G SSD, V4 Pro 😎

                Comment


                  #9
                  Originally posted by alexbk66 View Post
                  I'm not sure exactly what you did? Please post maps config screenshot.
                  Click image for larger version

Name:	traccar13.JPG
Views:	62
Size:	34.2 KB
ID:	1466823

                  key cut off on purpose....
                  Ubuntu on the Intel NUC ( 8i5BEK ), 32 G, 250G SSD, V4 Pro 😎

                  Comment


                    #10
                    Uri is C# class

                    Your Google Maps key seems to be wrong

                    Code:
                    https://maps.googleapis.com/maps/api/staticmap?markers=color:yellow|36.044205,-115.027481666|&zoom=14&size=400x400&key=AIzaSyCyygBzi6iRW10ns-02NRY2sGy-gQ7GdEQ
                    
                    The Google Maps Platform server rejected your request. The provided API key is invalid.

                    Comment


                      #11
                      You can make sure it works just by using the url in browser as above

                      Comment


                        #12
                        Uri

                        Comment


                          #13
                          Click image for larger version

Name:	traccar 14.JPG
Views:	69
Size:	100.9 KB
ID:	1466831


                          here is what I previously had in traccar to use google ( never worked )
                          now removed...

                          Ubuntu on the Intel NUC ( 8i5BEK ), 32 G, 250G SSD, V4 Pro 😎

                          Comment


                            #14
                            Originally posted by alexbk66 View Post
                            You can make sure it works just by using the url in browser as above
                            yep, says key is bad, will contact Google Support

                            case #34261385 .. will see what is probably a typo in key or the mess of API's
                            Ubuntu on the Intel NUC ( 8i5BEK ), 32 G, 250G SSD, V4 Pro 😎

                            Comment


                              #15
                              May be just try to generate new API key

                              Comment

                              Working...
                              X