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.

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

              	{"id":"1"
,"title":"Sales & Customer Services"
,"address":"Company Ltd, United Kingdom"
,"content":"office info goes here - but I would like an image here"
,"location":{"icon":"../img/pin_green.png"
  ,"lat":"12.4965009"
  ,"lng":"-2.4809569999999894"
  ,"city":"Nuneaton"
  ,"state":"England"
  ,"country":"United Kingdom"
  ,"redirect_url":"marker"
  ,"redirect_custom_link":""
  ,"open_new_tab":"yes"
  ,"postal_code":"XXXX XX"
  ,"draggable":false
  ,"infowindow_default_open":""
  ,"animation":"BOUNCE"
  ,"infowindow_disable":false
  ,"zoom":5}
,"categories":[{"id":"1","name":"Standard marker","type":"category","icon":"../img/pin_green.png"}]}
          
</script>

Would really appreciate any advice.

Many thanks
Z

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.

hth

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.