Back to amMap.com

Snap points

As of 2.5.6 version amMap allows dragging of movies around map area. Dragging can be enabled for all movies in settings file: <movies><draggable> or for each movie individually using "draggable" attribute.

In addition draggable movies can be set up to snap to certain points (reposition to the closest point to the drop location) on the map when dropped.

Map snap points must be placed into <snap_pints> node:

<snap_points>
    <!-- snap points by world coordinates -->
    <point long="-100.720707" lat="37.9210025834403" /> <!-- USA -->
    <point long="48.758991" lat="60.2396208895441" /> <!-- Russia -->
    <point long="134.341927" lat="-24.4901110663298" /> <!-- Australia -->
    <point long="-111.951047" lat="59.4606037066727" /> <!-- Canada -->
    <point long="-51.926816" lat="-10.8585929650071" /> <!-- Brasil -->
    <point long="108.008716" lat="32.2127533491027" /> <!-- China -->
    <point long="78.964733" lat="21.872859407281" /> <!-- India -->
    <point long="-3.520178" lat="40.327211147558" /> <!-- Spain -->
    <point long="1.901365" lat="46.7812536549844" /> <!-- France -->
 
    <!-- snap points by plot area coordinates -->
    <point x="50" y="50" />
    <point x="!50" y="50" />
    <point x="!50" y="!50" />
</snap_points>

As you can see from the example above, snap points can either be set for world coordinates (lat/long) or screen coordinates (x/y).

Movies that have been positioned using lat/long will snap to points with lat/long coordinates. They will ignore x/y snap points. And vice versa, movies with x/y coordinates will snap only to x/y points.

Below are all available snap point properties (attributes)

NameTypeIf not setDescription
x, yNumber, Number% or !Number Stage coordinates of the snap point
lat, longNumber Map coordinates of the snap point
ODT Export
Back to top