• Resolved vstma

    (@vstma)


    I Made a custom shortcode to adjust the styling of my map and it works almost perfect using this method here,
    http://wordpress.org/support/topic/shortcode-with-array-map-options?replies=4
    I added the script in functions.php

    It looks really nice and I’m glad it worked. However, I`m not really aware of what the script exactly does to the total architecture, due to my lack of knowledge in that.

    I have some issues which I think are easy to solve, but I can`t find how.

    1. the map loads first a standard google map layout, and then reloads the styled map. how can I turn this off so it immediately loads the custom map?
    2. the zoom + and – button are very weird and sort of squeezed, and I would like to turn this off, as well as the buttons to put it in satellite mode on the right corner. but changing the disable-map-controls.php doesn’t have any influence. probably logical because I made something custom.
    3. I would like to place a hyperlink on the marker and the adress, and perhaps change the icon of the marker with a logo. Here as well changing the images urls in the filter-marker-options.php do not really change anything. Also a cross should appear next to info (top right) when you click on the marker, but it`s also squeezed somehow, however you can still click on it to close.
    4. I have a responsive theme, but the size is set to 900 x900px, but when looking on a small screen it’s still the same. Using 100% doesn`t work either, so i guess the body or div container is not set correctly in some kind of way.

    If somebody could help me out with some or all of these points, that would be great!

    Thanks in advance!

    https://wordpress.org/plugins/pronamic-google-maps/

Viewing 1 replies (of 1 total)
  • Hello vstma.

    We have just pushed a new update that fixes the display of the double maps.

    You may need to wait a few moments for the WordPress Plugin Repository to notify you of the update.

    As for disabling the map controls, you can add to the existing map_options array you have from the copied code of the previous post.

    https://developers.google.com/maps/documentation/javascript/reference#MapOptions

    This page details all the options you can specify. So for example, in the code from the previous post you could add:

    function custom_pronamic_google_maps_the_content( $atts, $content=null ) {
            $content .= pronamic_google_maps( array(
                'echo'  => false,
                'width'  => 955,
                'height' => 400,
                'map_options' => array(
    				'styles' => array(
    					(object) array(
    						'stylers' => array(
    							(object) array( 'saturation' => '-100' ),
    						)
    					),
    				),
                                    'mapTypeControl' => false,
                                    'navigationControl' => false
    			)
            ) );
    
            return $content;
        }
    
        //add_filter( 'the_content', 'custom_pronamic_google_maps_the_content', 9 );
        add_shortcode( 'custom_googlemaps', 'custom_pronamic_google_maps_the_content' );

    The squeezing of the controls is normally attributed to responsive themes. We offer a CSS fix here: https://github.com/pronamic/wp-pronamic-google-maps/blob/develop/css/fix.css

    To change the marker icons, there is some example code here: https://github.com/pronamic/wp-pronamic-google-maps/blob/develop/examples/mashup-post-type-a-b-marker-icon.php

    Hope that answered all your questions. If you have some more feel free to respond.

Viewing 1 replies (of 1 total)
  • The topic ‘Double load of map’ is closed to new replies.