Animation in Google Maps - google-maps

i'm creating a simulation model using Google maps, i have created a new KML layer and marked few areas which are dangerous to users to go through, now i want to add a moving object to resemble a person on top of it and give a warning when that object nearing the area, does any one have the idea of doing animation of that kind using Google maps?

If you are talking about a moving marker i think you can use the setPosition of the marker object in a for loop feeding it with the coords of a line let's say.

Related

Google Maps marker drop on building not street

I'm currently making a custom map using the Google Maps API. So far I have inserted a kml layer using geoXml3, and have written the code to determine if the location of the marker (dropped by an autocomplete address search) is contained within the kml boundary.
Unfortunately I seemed to forget that the marker drops on the street outside the building, not the building itself. This is important as the kml layer is over buildings, and doesn't bleed on to the street.
Is there a way to get the marker to drop on the building instead of the street? If not, are there any alternative ways I could complete what I'm trying to achieve?
Cheers.

Google Maps - slowly moving map while gradually drawing predefined route

I am looking for a script / tool which will allow me to define a route on Google Maps and then create a series of frames where the map slowly moves along at a given zoom level while drawing the (previously defined) route.
If it is hard to imagine think of a mini map/overview for a time-lapse/video of a drive in a car. The time-lapse/video shows you the view through the windshield and this minimap/overview shows you where the footage is taken on a map. This is actually what I'm going to use it for.
Does anyone know of such a tool or a better place to ask this question (if this is not a proper place)?
If it does not exist I will have to create it using the Google Maps API.

Draw area/polygon and retrieve coordinates with google maps

Is there any tool that can help me with getting the coordinates for a specific area/polygon?
I usually use Google Earth.
Draw a polygon, then move the mouse over and right click > copy.
Then you can paste it in the notepad and you will find the coordinates there (remeber the format (long, lat,n) the reverse of Google Maps format.
You can also use online tools to format the information or remove parts.
http://www.earthpoint.us/Shapes.aspx
So the idea is to have a map, draw a polygon on it (I assume by placing the vertexes) and then getting the coordinates of the vertexes?
You can make markers draggable when you create then. You can also get the lat/lng position of the markers when certain events fire: the 'dragend' event, for instance.
With these tools, you have the basics of your requirements here. Make a button that places vertexes on the map - just use a marker with custom graphics - and let the user drag the vertex to whatever position they need. Record the new position of the vertex whenever the dragend event fires. Draw lines on the map between the markers, to show to the user the area selected. Have a button to 'complete' the shape, linking the last vertex up with the first vertex.
There may be some existing code to do this, but I am not aware of it. However, it should be possible to throw something together with a bit of work.

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 v3 API: KML layer messing with click, mouse events

I'm working on a project where, after creating some nice code for creating polygons and attaching mouse events to them, the addition of KML layers (mainly placemarkers) results in uncooperative behaviour between the placeholders of the KML layer and the generated polygons.
If I create the polygons first and set the KML file afterwards, clicking on the placemarkers brings up the infowindow () as expected. However, mouseovers on the polygons below yield no result, whereas before they get highlighted and are clickable (which they aren't).
Setting the KML layer to null doesn't help either. The placemarkers disappear, but my polygons aren't registering.
When I first call the KML with placemarkers, the polygon layer called later goes on top of the placemarkers. The polygons are opaque, so you can see the placemarkers like you could through a window, but you can't click or interact with the placemarkers.
Setting the polygons to null results in the same behaviour as before. Placeholders still cannot be clicked on.
Help? I couldn't find a zIndex reference for the KML layer code, and I'm hoping that's all it is. I read somewhere else - and imagine this to be true - that the KML and user-gernated content "layers" are conflicting with one another - the latter one that's put on the map takes focus, captures events, etc. I would've thought that it wouldn't matter, in the same way that you can have divs on top of other divs, especially if you use indexing.
If you simply want to display the information in the KML layer and not have it react to user events, you can add the suppressInfoWindows flag to the constructor:
var myKmlLayer = new google.maps.KmlLayer('http://gmaps-samples.googlecode.com/svn/trunk/ggeoxml/cta.kml', { suppressInfoWindows: true });
This will effectively shut off all interactions and let your other layers receive interactions.
Edit: Forgot to mention that a good source of information is the Google API V3 site discussing KML layers