admin管理员组

文章数量:1387463

I have a form where I receive the latitude,longitude values of a location.On submitting the form, I wish to create geofence in google maps of a static radius.I dont wish to draw the geofence using drawing tool directly.Can anyone suggest me a way as to how I can pass the values from the form to the map?

I have a form where I receive the latitude,longitude values of a location.On submitting the form, I wish to create geofence in google maps of a static radius.I dont wish to draw the geofence using drawing tool directly.Can anyone suggest me a way as to how I can pass the values from the form to the map?

Share Improve this question edited Jul 6, 2015 at 12:47 Sohel Khan A asked Jul 6, 2015 at 12:42 Sohel Khan ASohel Khan A 591 gold badge1 silver badge5 bronze badges 3
  • 2 Can you post some code? It might help give us a better idea of the context you're working in (e.g. how is java involved?). – khriskooper Commented Jul 6, 2015 at 13:10
  • Hi khris, I have created a HTML Form in which i get the latitude and longitude from google address autoplete feature.With these values ,when I click on button,it should create a geofence on the map with a static radius.Regarding how java is involved,it was a mistake from my side for adding java as a tag. My apologies. – Sohel Khan A Commented Jul 6, 2015 at 14:01
  • Do you need to use geofencing (which is deprecated), or can you just draw circles using the newer Google Maps API instead? – khriskooper Commented Jul 6, 2015 at 14:55
Add a ment  | 

1 Answer 1

Reset to default 3

As geofencing is deprecated I think it's best to use the new API.

I've created a Liveweave example of how to achieve something along these lines here.

You'll have to obtain the latitude / longtitude values from the URL of page shown after submitting the form. A good way to achieve this is demonstrated here.

本文标签: javascriptCreate Geofence using LatitudeLongitude valuesStack Overflow