Custom Markers/Icons

Permalink Browser Info Environment
I thought this would be beneficial to anyone who may be using this package. I have a client that wants to use a custom icon marker for all of their locations. After digging into it a bit, I came up with a solution.

In the view.php file find this line

var marker = new google.maps.Marker({
               position: point, 
               map: map<?php   echo $controller->bID?>,
               title:r.name,
           });


First you'll want to let the map know that there is a new variable for the icon marker. So, just before the code above you will want to add this line:

var image = '<?php echo $this->getThemePath()?>/yourimage.png';


Now, you will want to pull this into your map by editing the original marker code (above), so your new code will look like this:

var image = '<?php echo $this->getThemePath()?>/yourimage.png';
           var marker = new google.maps.Marker({
               position: point, 
               map: map<?php   echo $controller->bID?>,
               title:r.name,
          icon: image //We add this line to pull in the new map icon image
           });


You may want to create a custom template in the templates folder so you can always have your original as a back up.

Type: Discussion
Status: New
FatTony1952
View Replies:
2excelprogrammer replied on at Permalink Reply
2excelprogrammer
Thanks FatTony

Works Great..!!!

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.