4 Replies Latest reply on Sep 15, 2016 10:28 AM by Simon Runc

    Auto Scaling Shapes on Map

    Ian Reed

      I created a dual axis map with a polygon layer and a shape layer. The polygons were created using geocoded points (the polygons resize as you zoom in and out). The shapes, however, do not change size as you change your zoom. Is there anyway to autosize shapes as you change your zoom on the map?

        • 1. Re: Auto Scaling Shapes on Map

          Can you clarify what you mean by shape layer? Is that the filled map?

          Are you overlaying custom polygons onto a Tableau Map or geo locations onto a custom background map? Thanks!

          • 2. Re: Auto Scaling Shapes on Map
            Ian Reed

            Hi Hannah,


            Yes, the "Shape Layer" is a data point plotted on the Shape mark card (the location is geoocded based on lat/long). The polygons are created using the Polygon mark card (which are also geocoded based on lat/longs). The shape and polygon are plotted on a dual-axis standard Tableau map. Maybe this screen shot of randomly generated data will help exlpain this issue.


            This first picture is a zoomed in view of a polygon and shape:



            As you zoom out, the polygon shrinks but the shape remains the same size (see below).



            My goal is to have the shape "autosize" (or shrink) as you zoom out.


            Let me know if you have any thoughts! Thanks!

            • 3. Re: Auto Scaling Shapes on Map
              Mark Van Auken

              Having the exact same issue.

              • 4. Re: Auto Scaling Shapes on Map
                Simon Runc

                hi Mark/Ian,


                So here is a (potential) solution that might work depending on your exact use-case.


                So what I've done here is create a calculation (using the TOTAL) to compute how many States (in this example) I have in the Viz. I then use this on the Shape Size shelf, and also set up the sizing to work off a range



                Here's my formula

                [Size Shapes on Selection]

                IF TOTAL(COUNTD([State])) = 1 THEN 1 ELSE 0 END


                My version here does the opposite of what you want! my marks are very small when zoomed out, but if someone selects a state, the marks become bigger. I've set this to a single select, but we could add the formula to return different sizes for 1,2,3..etc states show...and could easily work off an Action Filter.


                Probably not perfect, but hopefully gives you some ideas.

                1 of 1 people found this helpful