-5

How to show map marker in Google Maps API using JavaScript?

How to search specific area with display around location? How to show with dotted lines?

anar khalilov
  • 16,993
  • 9
  • 47
  • 62
  • thanks for Khaliov .. i follow the link http://gmap3.net/en/catalog/. .but unable to display specific area location search in textbox i want to show with polygon lines in surround a city. ex:https://www.google.co.in/maps?hl=en plese help me lets example i search Hyderabad city i want to display sorround hyderabad location TIA – Ravi Guntreddi Jun 24 '15 at 14:49

1 Answers1

1

I'm not gonna do the whole job for you, but please have a look at gmap3. A jQuery plugin that lets you handle Google Maps in a very easy way.

Include the source file and then just to get started, create a div:

<div id="map"></div>

Then, in jQuery, run:

$("#map").gmap3();

This should generate a Google Map with no specific coordinates. If you want to get more complex, you can read all about that at http://gmap3.net/en/catalog/, but here's an example.

$('#map').gmap3({
 marker:{
    latLng:[29.132318972825445,81.32052349999992]
 }
});

This puts out a pin at a certain coordinate. They have a clear documentation, so just head over there and follow their instructions. Hope this helps!

Gustaf Gunér
  • 2,272
  • 4
  • 17
  • 23
  • thanks for Gustaf .. i follow the link gmap3.net/en/catalog. .but unable to display specific area location search in textbox i want to show with polygon lines in surround a city. ex:google.co.in/maps?hl=en plese help me lets example i search Hyderabad city i want to display sorround hyderabad location TIA – Ravi Guntreddi Jun 25 '15 at 06:18
  • @RaviGuntreddi Something like this? http://gmap3.net/en/catalog/10-overlays/circle-36 – Gustaf Gunér Jun 25 '15 at 06:22
  • Thanks for Gustaf .. i want to show with poly line in surround a city of search a specific location region area. can you please find below link for your reference. https://www.google.co.in/maps/place/Madhapur,+Hyderabad,+Telangana/@17.448437,78.3934532,14z/data=!3m1!4b1!4m2!3m1!1s0x3bcb9158f201b205:0x11bbe7be7792411b?hl=en TIA – Ravi Guntreddi Jun 25 '15 at 07:46
  • Embed it then? `` @RaviGuntreddi – Gustaf Gunér Jun 25 '15 at 07:49
  • Gustaf, Actually i have a requirement to draw like above example which i have provided. But how to integrate in our code dynamically with location or lat and longs? Can you please also check another ref site. https://housing.com/in/rent/search?f=eyJsb2N0IjoicG9seSIsInBvbHkiOnsiaWQiOiIxZmNmOGViZDUzYzZjN2QzMWE1YiIsImJ1ZmZlciI6ZmFsc2V9fQ%3D%3D – Ravi Guntreddi Jun 25 '15 at 07:57
  • @RaviGuntreddi http://stackoverflow.com/questions/6098947/styling-a-google-maps-v3-polyline-with-dashes-or-dots Perhaps? – Gustaf Gunér Jun 25 '15 at 08:12