In Google Mapmaker it's possible to draw polygons and in the edit state when you hold down shift it helps you to make right angles.http://www.google.com/mapmaker
When I try this in my own google maps where I enabled polygon drawings it's not possible to use the shift key to do this. Is there anything to enable this? It would be really useful.
This is what I use to make the polygons: https://developers.google.com/maps/documentation/javascript/examples/polygon-simple
Related
I need to create a shape on the google map. If the user wants to create a shape(Polygon, Circle, Rectangle, Square) with the help of Drawer he will be able to draw shapes.
Is there any related feature of Google Maps which I can use to achieve this feature?
Thanks in advance
There is, you may try reading Drawing Manager from Google Maps Api Drawing Layer (Library)
Here is a working example of what you can achive
GoogleEx_DrawingTools
First, I have been reviewing some of the different Google Maps API docs, but I've never done much coding with it. I'm trying to build a simple game for kids in which, if the user clicks on a map within a certain distance of a key map point (could be within 1 mile, 100 yards, 5 miles...depending on situation), then the map point becomes visible and a custom message is displayed with it.
Which google maps api calls would enable this to work? How would I embed a hidden point on the map? With the map being rendered on the client, for security, if I could detect the point clicked and send that point via ajax to the server, then the server could send back whether there is a hidden point at that location, that seems like it could work. Or maybe there's a better way.
Can someone point me in the right direction, as to which API calls, and maybe code samples if possible? To summarize, I'm looking for the following functionality:
Track the lat/long coords of any user-clicked point on a google map. Have that click send the coords to my javascript function.
Have hidden points on the map that the user can't see, but either Maps (or at least just my server via ajax) can be aware of.
Ability to display a custom message right next to the clicked spot or hidden point, when needed.
Thanks!
When I understand correctly what you are trying to achieve it's much easier.
Draw a circle and hide the circle by setting the strokeWeight and fillOpacity to 0 . As radius use the allowed distance, as center the LatLng of the point
Although the circle now is not visible, the API will still respond to click-events on the circle, you only have to set a click-listener for the circle and create e.g. a marker at the center of the circle.
Note: a clickable circle will have a different cursor, you must set a unique cursor for the complete map, otherwise the users will be able to find the circle by hovering the map.
Demo: http://jsfiddle.net/doktormolle/0secbwuf/
lovely to be here.
Quick question.
If you click on the following link: http://maps.google.com/maps?q=53.838061,-1.604025
It will take you to Google Maps and you can see a single pin on the map. This is done by sending two parameters via the URL which, in this case are: 53.838061,-1.604025. These are the Latitude and Longitude coordinates of one location.
What I wish to have is basically two sets of coordinates so I can see two pins on the map.
Does anyone know how to do this?
Any help is greatly appreciated.
Thank You.
I think you will have to use this api: http://code.google.com/apis/maps/documentation/staticmaps/#Markers
There are also some examples there. I hope this helps.
Am taking that you need to know the co-ordinates from the maps page and not via the api.
Right click on the spot, in the menu select "whats here", maps inserts a marker on the spot, coordinates are on the search text box and also on mouse hover on the marker.
I am making an application with google maps.
When markers are overlapping only the last one is displayed even if the icons are different..
I do not want it to cluster in that case, rather it should show both maybe by changing the coordinates just a but??
Any solutions??
I think this is a pretty elegant solution, called Spiderfying the markers.
https://github.com/jawj/OverlappingMarkerSpiderfier
I'm thinking of using it.
What I do now is use JavaScript to make a fancy popup that hides and shows divs on one marker location (created problematically in PHP, but you could do it on JS too). It has the side benefit of allowing less markers on the map.
Click a black numbered marker on this map to see it in action.
http://www.yourmapper.com/map/111/crime-reports/crime-in-metro-louisville-ky-since-jan-2003.htm
Another option is to use Google Maps API 3 Utility Library, it has a Marker Clusterer.
I'm looking looking for a tool that will allow me to make a map exactly like this:
http://datasearch.uts.edu.au/about/mapsdirections/map.cfm
Basically I need to put shapes around buildings in the satellite view and then slap a marker and information window on them so that I can specify the building name and contents.
So the main issue is that I need the ability to draw shapes directly onto the maps as I don't fancy taking down the lat lng of each corner of the polygon.
Ideally what I'd like to do is have an online application that exports those points to KML, and then I would display google maps on my site and import that kml to display it.
Other suggestions welcome!
Jason
Found a polygon creator
http://www.the-di-lab.com/polygon/
It's simple to use and allows you to copy and paste straight into your code. Would be nice if it had a button that said sent to kml though..