Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Koen van Ras 56 posts 361 karma points c-trib
    Dec 18, 2018 @ 14:42
    Koen van Ras
    0

    Disable default value

    Hi,

    I'm trying to unset the default value for the Google Maps v3 TerraType.

    I need this because it should be possible to leave the coordinates empty so the location doesn't show on the page.

    Is there any way to disable the default value for this data type so the coordinates can be left empty? If so, how?

  • Jonathan Richards 288 posts 1742 karma points MVP
    Dec 19, 2018 @ 10:07
    Jonathan Richards
    1

    Hi Koen,

    Thank you for your feedback.

    This feature has been requested before, currently it is not something I could implement quickly, as it would involve some UX to allow users to set and unset coordinates and then a change to the model to allow Null coordinates, which might break existing implementations. Plus an understanding of what happens when someone tries to render a Null Coordinate map, I've noted you have asked for no map to appear, which is one approach.

    The other-side of the coin is, I'm in two minds, is it worth my time writing a feature that seems to me to be outside the scope of Terratype altogether. If for example a place is closed, or doesn't exist, then why are you offering your Content Editors a Terratype Map at all. This seems something that should be controlled by a Boolean value (True/False Property) and not by NOT setting coordinates in a Map Property.

    Ultimately, I do keep re-evaluating this issue, and I thank you.

    Cheers

    Jonathan

  • Koen van Ras 56 posts 361 karma points c-trib
    Dec 19, 2018 @ 10:14
    Koen van Ras
    1

    Hi Jonathan,

    Thank you for your reply!

    The fact that I want the content editors to see the Terratype Map is that I'm using this inside of a content block. The content block contains some fields to create a highlight on the website, then if the content editor decides to enter location coordinates, this location will be displayed in the map aswell. If they don't enter the coordinates the highlight will only show as a text box under the map.

    Adding a true/false property is indeed a good solution, still I didn't find it very nice to show a random total irrelevant location on the map even though they don't use the map at all, thats why I found it more beautifull to not enter coordinates at all in the field so it doesn't show any marker or irrelevant location, or maybe not even the map since it's not needed in this specific case anyway.

    Thank you!

    Koen

  • Jonathan Richards 288 posts 1742 karma points MVP
    Dec 19, 2018 @ 11:31
    Jonathan Richards
    100

    Hi Koen,

    Because of your post, I started a conversation elsewhere about hiding and showing relevant content to a Content Editor, in your case a Terratype Map depending on the value of True/False property and I've been informed that this can be done using

    https://our.umbraco.com/packages/website-utilities/personalisation-groups/

    Apparently, as well as doing a million other things it also does

    an extension method on IPublishedContent to allow you to show or hide content according to these criteria in your templates.

    I can't vouch for how relevant this is to your needs, but I thought this was interesting enough to mention it, and I personally will be taking a more in depth look when I next need behaviour like this.

    I hope this helps

    Cheers

    Jonathan

  • Koen van Ras 56 posts 361 karma points c-trib
    Dec 19, 2018 @ 12:12
    Koen van Ras
    0

    Hi Jonathan,

    Thank you very much for looking into this! I'm definitely going to try this out, this might be exactly the solution that I'm looking for.

    Koen

  • Jonathan Richards 288 posts 1742 karma points MVP
    Jan 02, 2019 @ 15:41
    Jonathan Richards
    1

    For anyone that stumbles across this thread in the future, I have been informed of another package that can be used to shows and hide properties in the content view

    https://our.umbraco.com/packages/backoffice-extensions/conditional-displayers/

    Again I can't vouch for it, but it does look great

Please Sign in or register to post replies

Write your reply to:

Draft