• Tomas
    February 19, 2014 at 4:23 pm #23551

    Hi Anna,

    I want to add a zoom option to google_map_submit.js, to improve the users experience when adding the location to a property.

    I checked , and it refer to the following code that must be use within the MapOptions object:


    zoomControl: true,
    zoomControlOptions: {
    style: google.maps.ZoomControlStyle.SMALL
    }

    I used this function to modify google_map_submit.js, and the result is shown below:


    var mapOptions = {
    flat:false,
    noClear:false,
    zoom: 17,
    scrollwheel: true,
    draggable: true,
    disableDefaultUI:true,
    center: new google.maps.LatLng( listing_lat, listing_lon),
    mapTypeId: google.maps.MapTypeId.ROADMAP,
    zoomControl: true,
    zoomControlOptions: {
    style: google.maps.ZoomControlStyle.DEFAULT
    }
    };

    However, something is wrong with the code because the zoom control is not showing. Do you see any problems with this code or its implementation?

    Thanks for your help!
    Tomas

    Tomas
    February 19, 2014 at 4:27 pm #23552

    Reference:

    The code that I am using can be found in Google Maps JavaScript API v3 documentation:

    https://developers.google.com/maps/documentation/javascript/controls?hl=en

    crerem
    February 20, 2014 at 12:41 pm #23582

    Try like this

    var mapOptions = {
    flat:false,
    noClear:false,
    zoom: 17,
    scrollwheel: true,
    draggable: true,
    disableDefaultUI:false,
    center: new google.maps.LatLng( listing_lat, listing_lon),
    mapTypeId: google.maps.MapTypeId.ROADMAP
    };

    doensn’t work pls reply with a live url

    Tomas
    February 20, 2014 at 6:19 pm #23586

    Hi Crerem,

    The code is working great…!!! =)

    The only thing remaining are the styles. I need to adjust the image “mapcnt3.png” to the new layout. Could you give me the name of the css file that is responsible for setting up the styles.

    If you send me an email I can give you admin access to the website.

    Thanks again for your help!

    Regards,
    Tomas

    Tomas
    February 21, 2014 at 7:07 pm #23682

    Hi Crerem,

    I run a multi file search and there is no evidence on a “class” or “id” for styling the map. Maybe it’s coming from google’s map API. I see the source code using chrome developer tool, but I can’t target this code and modify the styles.

    This is a screenshot of what I see,
    http://www.flickr.com/photos/118326936@N06/12680837693/

    Do you have any suggestions? Is it possible to use google.maps.ZoomControlStyle.DEFAULT instead?

    I also want to make a small suggest for the coordinates. It will be great if old coordinates can disappear when the user clicks on a new position. This will prevent having several coordinates in the map at the same time.

    Thanks again for your help!!

    Best Regards,
    Tomas

You must be logged in to reply to this topic.

Contact Us

We're not around right now. But you can send us an email and we'll get back to you, asap.