6 Replies Latest reply on Jan 2, 2019 9:38 AM by Rishu Thukral

    Drop a pin when user clicks on the map

    Rishu Thukral

      Hi All,

       

      I'm trying to make my map "interactive" and would like to drop a pin at the coordinate which the user clicks on ( similar to how google maps will drop a pin if you click anywhere on the map).

      Once the pin is dropped, i'd like to be able to read the lat-long coordinates which were clicked.

      Is there a way to do this in tabelau ?

        • 1. Re: Drop a pin when user clicks on the map
          Vikram Gokhale

          Will the map have finite marks or it should show lat-long of any point clicked on the map ?

          • 2. Re: Drop a pin when user clicks on the map
            Rishu Thukral

            Hi Vikram, would like the map to show the lat-long of any point clicked on the map.

            • 3. Re: Drop a pin when user clicks on the map
              Peter Fakan

              Hi Rishu,

               

              Is this the kind of thing you are looking for ?

               

               

              I mocked this up using superstore data, the dashboard has a highlight filter on sheet 1 from the sheet 2 selection. You could also change the way that the lat long displays by making it pop up on the map when selected.

               

              HTH 18.3 attached

               

              Peter

              1 of 1 people found this helpful
              • 4. Re: Drop a pin when user clicks on the map
                Rishu Thukral

                Hi Peter,

                 

                Thanks for your response. It appears that your worksheet is showing a

                tool-tip using labels when i hover over or click a 'pre-populated' zip

                code.

                Instead, i'm trying to make the map take an input from the user - it the

                user clicks a blank spot on the map, i'd like to place a dot at that

                coordinate and show the coordinates where the user clicked - similar to how

                google maps works. I don't think this is possible in the standard tableau

                functionality since there needs to be an underlying data set instead of

                taking user inputs to build the visulaization, but wanted to check with the

                experts on this forum.

                Some other ways may be to use an plug in with tableau but not sure where to

                start

                 

                Thanks,

                Rishu

                 

                On Tue, Jan 1, 2019 at 4:41 PM Peter Fakan <tableaucommunity@tableau.com>

                • 5. Re: Drop a pin when user clicks on the map
                  Peter Fakan

                  Hi Rishu,

                   

                  I took another approach - this one uses a custom column/row dataset that can get as detailed as you need (i.e. I just went to 10 row x 10 column but you might want to change the detail to 1000 x 1000 for example)

                   

                   

                  Step 1 - load your box grid data

                   

                  Step 2 - select Map > Background Images > your sheet name

                   

                  Step 3 - when you load your image, set the X and Y field to Row and Column, and set the extremes to the same amount of detail you have set (in this case mine is a 10x10 box)

                   

                  Step 4 - change the shape of the mark to your pin icon (I just used a red upside down triangle)

                   

                  Depending on the amount of work you want to do, you could potentially map each grid location to a lat/long location and have the tooltip put up the correct info, however that would be a lot more work IMHO.

                   

                  HTH

                   

                  Peter

                  1 of 1 people found this helpful
                  • 6. Re: Drop a pin when user clicks on the map
                    Rishu Thukral

                    Peter, this is a really innovative way of doing this - very cool , thank you !

                    I agree - it would be a lot of work if we were to build a grid at a more detailed level, and it might make the workbook very bulky.  But good thing is that it will definitely work and it is a viable solution.

                    i'm leaning towards using a plug in with tableau. Will do some research and share if i find something. I was actually able to do this in power bi using a logic apps plug in which imported Bing maps and it worked just like the online bing maps - smooth zooming, click and drop pins anywhere, etc.

                    I was hoping for a similar way to do this in Tableau

                     

                    Thanks so much for your time on this !

                     

                    Best,

                    Rishu