Active
Project:
GMap Module
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
19 Jul 2012 at 18:07 UTC
Updated:
13 Oct 2015 at 07:35 UTC
Jump to comment: Most recent
Hello,
I have a Gmap location chooser enabled on my user register form and I would like to figure out a way to add a circle overlay centered on the map marker showing a 10KM radius.
I found an article on stackoverflow outlining how to do it with the Google Maps API V3 : http://stackoverflow.com/questions/825794/draw-radius-around-a-point-in-...
// Create marker
var marker = new google.maps.Marker({
map: map,
position: new google.maps.LatLng(53, -2.5),
title: 'Some location'
});
// Add circle overlay and bind to marker
var circle = new google.maps.Circle({
map: map,
radius: 16093, // 10 miles in metres
fillColor: '#AA0000'
});
circle.bindTo('center', marker, 'position');
I'm hoping there's a way to add something like this to my Gmap somehow. Has anyone out there tried something like this yet?
Any help would be greatly appreciated.
Cheers
Comments
Comment #1
countrdd commentedDid you get this working?
Comment #2
maul commentedtry this