gmap - use coodinates instead of address

2 replies · opened Apr 22, 2016

AamaroamaralApr 22, 2016

Hi.

Is there a way to use coordinates for more accuracy in gmap script instead of using "text" address?

Now it's like:

<script type="text/javascript">

	$('#google-map').gMap({
		address: 'Melbourne, Australia',

Thks in advance!

SSemicolon WebSTAFFApr 25, 2016

Hello,

This is Definitely Possible. You can change the Location by simply changing the address: 'Melbourne, Australia' option to a Latitude/Longitude Combination in the Google Maps JS Initialization Code. Example:


	jQuery('#google-map1').gMap({

		latitude: your-latitude-value,
		longitude: your-longitude-value,
		maptype: 'ROADMAP',
		zoom: 14,
		markers: [
			{
				latitude: your-latitude-value,
				longitude: your-longitude-value,
			}
		],
		doubleclickzoom: false,
		controls: {
			panControl: true,
			zoomControl: true,
			mapTypeControl: true,
			scaleControl: false,
			streetViewControl: false,
			overviewMapControl: false
		}
	});

Make sure that your Latitude/Longitude value should be a Float Number. This will definitely work fine.

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

AamaroamaralApr 26, 2016

Thank You. I will try! And Thank you for this great theme!

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