Copied to clipboard

Flag this post as spam?

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


  • Lee Kelleher 4020 posts 15802 karma points MVP 13x admin c-trib
    Oct 11, 2016 @ 13:29
    Lee Kelleher
    1

    Disable StreetView in editor control?

    Hi Jonathan,

    Is it possible to disable the little StreetView man/icon in the map's controls?

    If not, then would you be interested in a pull-request for this?
    e.g. to add a checkbox to the data-type config

    Thanks,
    - Lee

  • Jonathan Richards 288 posts 1742 karma points MVP
    Oct 11, 2016 @ 14:19
    Jonathan Richards
    100

    Hey Lee,

    Right now, the map is being loaded with the args (See line 1192 of agm.js)

                        $scope.map.control.setGMap(new google.maps.Map(document.getElementById('AGM_' + $scope.model.alias + '_map'), {
                            disableDefaultUI: false,
                            panControl: true,
                            navigationControl: true,
                            scrollwheel: false,
                            scaleControl: true,
                            center: {
                                lat: jsonModel.latitude,
                                lng: jsonModel.longitude
                            },
                            zoom: $scope.jsonModel.zoom,
                            draggable: true
                        }));
    

    For the want of a default, as you state the map is loaded with the street view's 'pegman' enabled. It would be trivial to add the hardcoded value

    streetView: false
    

    to the map options, to switch him off.

    What would be better, is to allow this value to be configurable in the property editor. Though, I know this will make the task multiple times longer to write.

    Which approach did you imagine ?

    Cheers

    Jonathan

  • Lee Kelleher 4020 posts 15802 karma points MVP 13x admin c-trib
    Oct 11, 2016 @ 14:42
    Lee Kelleher
    1

    Quick note, the param is...

    streetViewControl: false
    
  • Jonathan Richards 288 posts 1742 karma points MVP
    Oct 11, 2016 @ 14:21
    Jonathan Richards
    0

    Sometimes I'm stupid, you state you are gonna do it in the config.

    Yes please, a pull-request would be lovely

  • Lee Kelleher 4020 posts 15802 karma points MVP 13x admin c-trib
    Oct 11, 2016 @ 14:29
    Lee Kelleher
    1

    Thanks Jonathan!

    I'll hardcode it for an immediate fix - my client keeps dragging "pegman", for some reason?

    A pull-request for you had been added my TODO list... don't hold your breath might be later this week or next.

    Cheers,
    - Lee

  • Lee Kelleher 4020 posts 15802 karma points MVP 13x admin c-trib
    Oct 11, 2016 @ 17:19
    Lee Kelleher
    1

    Question about the data-type option, do you think StreetView should be enabled or disabled by default?

    Personally, I'd go with disabled and someone would need to enable it explicitly.

    Cheers,
    - Lee

  • Jonathan Richards 288 posts 1742 karma points MVP
    Oct 12, 2016 @ 12:06
    Jonathan Richards
    1

    I suppose its what you are trying to achieve:-

    • A clean crisp map with as little extras added, forcing the editor to focus on the core task in hand OR
    • Give the content editor all the tools he has come to love and expect from a google map including the ability to switch to satellite and/or street view.

    Being a suave sophisticated user (?), I want all the bells and whistles - but who can argue with the minimalist approach.

    So yeah, this all needs to be configurable. I've been keen on being able to change the colours of the google map too - sexy grey scale FTW.

    Let me get a bit of free time, and I will add this stuff. Because, up to now, nobody has asked for this.

    Cheers

Please Sign in or register to post replies

Write your reply to:

Draft