Having Two Address (Markers) on Google Map

4 replies · opened Aug 3, 2020

DdemidnightAug 3, 2020

Hi, is there a way to have two map markers on the Google Map? Code for the map:

``

Thank you,

SSemicolon WebSTAFFAug 4, 2020

Hello,

Absolutely! Simply consider using this code:


data-markers='[{ address: "Sydney Australia", html: "Sydney Australia", icon:{ image: "one-page/images/icons/map-icon-red.png", iconsize: [32, 32], iconanchor: [14,44] } }, { address: "Melbourne, Australia", html: "Melbourne, Australia", icon:{ image: "one-page/images/icons/map-icon-red.png", iconsize: [32, 32], iconanchor: [14,44] } }]'

This will definitely work fine. Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

DdemidnightAug 14, 2020

Hi, what do I need to do for the data-address variable? I have tried the following but only shows one address on the map. Thank you,

`data-address='[{address: "address 1" }, { address: "address 2" }]'

SSemicolon WebSTAFFAug 15, 2020

Hello,

The use of data-address is incorrect. The data-address is used only to Center the Map on a Certain Location. You will need to use the data-markers to add Markers to Multiple Address on your Map. The codes we have provided above will work perfectly fine for this. You can use a different Value for the data-zoom Attribute to Zoom Out the Map. More Documentation available here: http://docs.semicolonweb.com/docs/shortcodes/google-maps/ .

Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

DdemidnightAug 15, 2020

That helps, thank you very much.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard