Web-based UI element for selecting a geographical location - google-maps

I'd like to create / use a UI element for a web-site that provides a world map, on which the user can draw a circle to indicate an area of interest. I'd like information on the coordinates of the area covered by the circle to be available to me via Javascript for sending back to the server over Ajax.
Does such a control exist, and if not how difficult would this be to implement using something like Google Maps?

Google would have that as part of it's api as would OpenLayers

maybe Artem GoogleMap can help you.

Related

Custom Polygons / User Editable Shapes

Currently, on a web application I am working on, one of our clients asked for a feature I am not quite sure how to implement. We have a Google Map on the main page and our client wants to be able to draw on that map for presentations. I have seen two examples of what our client wants. The first example is at http://www.scribblemaps.com/ where I can draw lines, shapes, and in the Pro version "block arrows" which is what our client is asking for. However, this application only allows you to create the map on their site and then save it as a JPEG. Our client wants to do this within our application. Scribble Maps accomplishes this by using Adobe Flash and I'm guessing they place a Google Map in the background which I am not sure would be the best route for us.
I also found this blog http://googlegeodevelopers.blogspot.com/2011/11/make-your-map-interactive-with-shape.html describing User Editable Shapes. On this example I am able to create shapes and Adjust the size post creation. I was wondering if it were possible to create a custom polygon like a block arrow as another button on the map where the user could add that shape to the map and edit the size? I realize the user could use the custom polygon button but I know our client won't want to draw their own arrow each time.
* EDIT *
So that I am clear I am not asking anyone to write any code for me but point in the direction of information. I want to know if it is possible to pre-create polygon shapes like "block arrows" so that our client can click and drag to draw this arrow on the map like circles or rectangles using just the Google Maps API.
I had vary similar tasks to perform in my project.
You can let them draw shapes on the map. In my project I have let he user draw there shape by clicking on map and adding a marker on each click and when he clicks on the existing marker all the makers form a closed polygon. Then you can save it to database. As far as that editing part you mentioned above, you can set editable property of polygon to true to let them play with polygon.
Hope this helps you in your project.
Happy Coding !! Good Luck
Maybe a late answer but I think this one would be useful for you.
https://developers.google.com/maps/documentation/javascript/examples/user-editable-shapes

Google map simple map

I need to put a map on a website but the clients doesn't want anything but a simple outline of the United States. I used google maps styling wizard but still wasn't able to get just the outline. The reason I want to use google maps is I need to dynamically place markers using the latitude and longitude coordinates.
Thanks
Pretty sure you can't do this with Google Maps. You may have better luck with Leaflet:
Leaflet is a modern, lightweight open-source JavaScript library for interactive maps for desktop and mobile web browsers, developed by CloudMade to form the core of its next generation JavaScript API. Weighting just about 21kb of gzipped JS code, it still has all the features you will ever need for you web mapping needs while providing a fast, smooth, pleasant user experience.
http://leaflet.cloudmade.com/
Just use a single map image with the outline you want. If you need to generate the image yourself and really customize the map, you'll want to combine Leaflet with a few tiles generated with Mapnik, OpenStreetMap data (not the whole-world dataset probably), and possssibly TileCache.
http://tilecache.org/
http://mapnik.org/
http://planet.openstreetmap.org/

Google Maps - Online Map Marker to mark polygons and shapes onto the map

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..

Google Maps: Traffic on top of Custom Map

I want to add traffic information to my custom map. Currently I'm using a Tile Layer Overlay on my Google Map to display custom map tiles. When I try to add GTrafficOverlay to my map, my custom map tiles display above the traffic information. Is there any way to display the traffic above my GTileLayerOverlay?
(Using the JavaScript api)
You should be able to do this in V3. Take a look at this sample: http://code.google.com/apis/maps/documentation/v3/overlays.html#ImageMapTypes
I tried this out and wasn't able to find a solution to the problem. There is nothing in the GTrafficOverlayOptions and I couldn't find anything in the references about the z-order of this stuff. I have suspect that this isn't possible.
Would love to see an alternative answer showing that I am wrong.

Do i need use google maps api only to embed litle map with route calculator/display for only one destination?

Well i want to upgrade contact page with dynamic map showing location and give oportunity to calculate route for comapny headquatters. Id it necessery for such simple task use Google api? i mean here generating akey etc? Fo i have any other alternatives to google maps?
There's really no reason to mess with the API at all unless you need to customize the appearance or behavior of gmaps. Why not just use an iframe with a url of:
http://maps.google.com/?q=[you-url-encoded-address-here]
or better yet, set up a textbox and a 'get directions' button to redirect that frame to:
http://maps.google.com/maps?saddr=[their-address]&daddr=[your-address]
edit: this works well in modal dialog if you don't want the google logo sticking out like a sore thumb in your pageflow
You could probably embed directly with a specific URL that will configure it to have the destination you want.
By the way, well written answers are much more likely to receive useful responses here.
You could consider http://www.openlayers.org/ as an alternative to google maps.
In fact open layers can be used to add a Google map, or an OpenStreetMap map or a Bing map, etc.