Changing Google maps block colors


I've been able to change the colors of the google maps block before.
But now, it suddenly stopped working (concrete

To do this i edit the view.php file for the google_maps block:

<?php defined('C5_EXECUTE') or die("Access Denied.");
$c = Page::getCurrentPage();
if ($c->isEditMode()) { ?>
   <div class="ccm-edit-mode-disabled-item" style="width: <?php echo $width; ?>; height: <?php echo $height; ?>">
      <div style="padding: 80px 0px 0px 0px"><?php echo t('Google Map disabled in edit mode.')?></div>
<?php  } else { ?>
   <?php  if( strlen($title)>0){ ?><h3><?php echo $title?></h3><?php  } ?>
   <div id="googleMapCanvas<?php echo $unique_identifier?>" class="googleMapCanvas" style="width: <?php echo $width; ?>; height: <?php echo $height; ?>"></div>
<?php  } ?>
    Note - this goes in here because it's the only way to preserve block caching for this block. We can't
    set these values through the controller

Am i doing something wrong here? Any help?

View Replies: View Best Answer
mesuva replied on at Permalink Best Answer Reply
This sounds like you might have edited the Google Map block's view.php file directly in the concrete folder, instead of creating an override for it.

When concrete5 is updated, the core is effectively replaced, along with it any changes you've made to it. This is why you never modify the core, you always create override for it.

Your sample code looks correct, but this would live in:
grafoman replied on at Permalink Reply
This was my mistake. Thank you!
grafoman replied on at Permalink Reply
Is there a way to easily change the marker color? It's always red.
ramonleenders replied on at Permalink Reply
See the Google Maps docs here:

In specific, this:

var image = 'images/beachflag.png';
  var beachMarker = new google.maps.Marker({
    position: {lat: -33.890, lng: 151.274},
    map: map,
    icon: image

You can point towards an image if you'd like. In the above example, that will be images/beachflag.png. So just point towards an .png/.jpg or whatever image file you have!