Help with a google map location pins please

I am trying to edit a google map location script.

I would like when someone clicks on a pin that instead of a text box popping up, a box with an image loads, to show the location e.g. an office.

This is the code I have to load the pin and the box at the moment, where it loads text only.

jQuery(document).ready(function($) {
              var map = $("#map1").maps({"places":[

,"title":"Sales & Customer Services"
,"address":"Company Ltd, United Kingdom"
,"content":"office info goes here - but I would like an image here"
  ,"country":"United Kingdom"
  ,"postal_code":"XXXX XX"
,"categories":[{"id":"1","name":"Standard marker","type":"category","icon":"../img/pin_green.png"}]}

Would really appreciate any advice.

Many thanks

You can put images etc into the info window and you can also style the info window to a certain extent. I can’t remember the code for it from memory but i have done it. Use code inspector and see if you can see the class or ids of the divs it uses and apply css to that.


I know it can be done, I am just not sure how

When I inspect the text box on the site, the div is

<div class="wpgmp_infowindow">office location</div>

I don’t see how I can place an inline image here as I don’t get that in the code view, except when viewing the source

Have you checked the Google API documentation? This is for an Info window

I would guess you can change the text to a image

Hi Rubble

I had a read on there but didn’t see anything that helped :frowning:

I am still no further on sadly.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.