1 2 Previous Next 17 Replies Latest reply on Apr 28, 2020 8:10 AM by Joe Schweigert

    Default zoom level for maps

    Stephen Lavery



      I had a query about maps and the default zoom level. I have a set of specific addresses which I want to filter between to see where they are on the map. Tableau defaults to show a hyper zoomed out version when only showing one point:



      As I change my filter I want the map to be zoomed right up to the point by default so i can see what street it's on i.e up to a 5km scale. Basically I want to fix the axes which doesn't seem to be an option for maps.


      Many thanks,


        • 1. Re: Default zoom level for maps
          Matthias Goossens

          Hey Stephen,


          Your problem is solved when you use a filled map.

          Hope this helps




          1 of 1 people found this helpful
          • 2. Re: Default zoom level for maps
            Stephen Lavery

            Hi Matt,


            That only works where I can use filled maps so for a county, state, postcode sector etc. but in cases where I have a specific point such as an exact latitude and longitude filled maps don't work.


            See the attached workbook as an example of what I mean.


            Thanks for your response,


            • 3. Re: Default zoom level for maps
              Sreenadha Reddy Palakolanu

              Hi Stephen,

              Please zoom the area by Selecting Ctrl+Shift+Drag and Press shift to lock on the Map.


              Hope this is helpful to you and Let us know if you need further assistance.



              Sreenadha Reddy Palakolanu

              1 of 1 people found this helpful
              • 4. Re: Default zoom level for maps

                Hi Stephen,


                I think this is an issue as Tableau requires at least 2 points to reference an appropriate level of zoom to use.  The only workaround I have found to this is to duplicate all of your data so every point effectively becomes 2 points.  Not elegant and obviously if you are working with a large amount of data will be an issue.....


                There is an idea here that would be worth voting on https://community.tableau.com/ideas/6568

                • 5. Re: Default zoom level for maps
                  Stephen Lavery

                  Hi Nigel,


                  I ended up doing something similar to your suggestion which gave me a bit of a result. I showed the next nearest point to the point I was filtering on and made this point an invisible shape so you couldn't see it on the map. Not great but it kinda works


                  Thanks for the link. Will definitely be voting on this idea.




                  • 6. Re: Default zoom level for maps
                    Abhiram Sahasrabudhe



                    I am trying to duplicate the data as per your suggestion, but didnt quiet get what you mean by that.


                    I tried creating dummy lat and long fields, which are slightly different than the original location and add them to the view, but then I cant plot the map, the option is disabled.


                    Am I missing something very obvious?



                    • 7. Re: Default zoom level for maps

                      Hi Abhiram,


                      Sorry, I should have supplied some more details to replicate this.


                      I have duplicated all of my data and made a very small change to only the Lats of the duplicate copy of the records - i.e. "original lat" + 0.00000000000000001 or something small to make them slightly unique.  I also added a column to the data that flagged each record as being "original" or "new" and used this to size the points ("original" size - large, "new" size - small) so when they are plotted the new records effectively appear under the original points so each pair "looks" like one point. 


                      As the duplicated records contain all of the same data as the original (except the different Lat), when filters etc are applied they are all affected together so the zoom works when one point is shown as in reality 2 are actually displayed (one is just tiny and under the large "real" data point). 


                      Anyway, this method is of no consequence when working with small datasets and if you don't mind some manual editing of the input file but this duplication of records would obviously be a problem at scale and is a bit clunky.... would be better solved of course on the software side but in the meantime seems ok as a workaround.


                      Hope this helps.

                      • 8. Re: Default zoom level for maps
                        Abhiram Sahasrabudhe

                        Thanks a lot nigel.matthew,


                        I am trying this out, and shall let you know what happens.


                        • 9. Re: Default zoom level for maps
                          Abhiram Sahasrabudhe

                          HI nigel.matthew, I am still trying to do this, sorting out some issues with data duplication. Will post back ASAP.

                          • 10. Re: Default zoom level for maps
                            Abhiram Sahasrabudhe



                            Thanks for the tip, after some fiddling around, I could do it after converting lattitude and longitude to dimensions.


                            Now i need to play around with the amount of distance between the duplicated point and the sizes to get the desired zoom level for each point.

                            Thanks a lot.


                            • 11. Re: Default zoom level for maps

                              Hi Abhiram,


                              Glad its coming together - see attached for an example of how I have set this up.  I have colour coded the records in excel for the original (green) and duplicate (red) records.


                              Note the longitude for the duplicates is equal to the original longitude plus a small value (see formula in J27 for example).  Also note the record ID in A2 is equal to the record ID in A27 - it's just a repeat of all the same data, the only difference is the "status" I have assigned and the longitude value for the duplicates.





                              In the workbook you can now select from the filter a single ID record and I think you will find the level of zoom is acceptable - note I have assigned "Status" to size to make the new records small and original large etc.


                              Selecting the data point and looking at the underlying data will reveal there are actually 2 records of course, one is just hidden under the other.

                              1 of 1 people found this helpful
                              • 12. Re: Default zoom level for maps
                                Lisa Deters

                                Hey all,


                                with the new functions MAKEPOINT and MAKELINE you can solve this without changing the data!


                                You just create a double axis with the desired point and an invisible line with the desired zoom.




                                Here is how:


                                1. Create a parameter p_zoom (e.g. with values 1, 0.5, 0.1, 0.01)
                                2. create 4 calculated fields:
                                  1. Original point as point object ([point1]):  MAKEPOINT([Latitude],[Longitude])
                                  2. Two points with the added zoom ([Makepoint-zoom],[Makepoint+zoom] ): MAKEPOINT([Latitude]+[p_zoom],[Longitude]+[p_zoom])  MAKEPOINT([Latitude]-[p_zoom],[Longitude]-[p_zoom])
                                3.   A line between these points[zoomline]: MAKELINE([Makepoint-zoom],[Makepoint+zoom])
                                4. Show the field [zoomline] on a map
                                5. Douplicate the generated longitude
                                6. Replace the second [zoomline] field on the detail shelf with the [point1] field
                                7. Change the format of the point as you like (e.g. point instead of automatic, bigger, red) and the format of the line to be invisible (e.g. opacity = 0%)
                                4 of 4 people found this helpful
                                • 13. Re: Default zoom level for maps
                                  Alex Kerin

                                  Lisa, this is a great solution - thank you. I posted a link to your reply on the ideas page for controlling map zoom.

                                  • 14. Re: Default zoom level for maps
                                    Smriti Shrestha

                                    Thanks for the solution Lisa. Is there a way to not display the line created by Makeline() ? I have reduced the color opacity to 0% but if i hover over it, i can still see the line.

                                    1 2 Previous Next