---
- Be easy to integrate in to any java application
- Be orginized and will structured
- Be Well Commented and Documentated
1. Download and import the zip file 2. Do something like this
import mappanel.window.MapPanel;
import javax.swing.JFrame;
public class someClass
{
String title = "Some Title";
MapPanel map = new MapPanel();
public static void main()
{
JFrame frame = new JFrame(title);
frame.add(map);
frame.pack();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setResizable(true);
frame.setLocationRelativeTo(null);
frame.setVisible(true);
map.start();
}
}
After starting the map, do something like this ```java public void initPoint() { double someLon = 10; double someLat = 10; MapPoint point = MapPoint(ObjectID.Point,someLon,someLat); map.addPoint(point); } ``` This will create an X on to that lon/lat. the X is the default picture
public void initShape()
{
ArrayList<Double> Lons = new ArrayList<Double>();
ArrayList<Double> Lats = new ArrayList<Double>();
Lons.add(10d);
Lats.add(10d);
Lons.add(-10d);
Lats.add(10d);
Lons.add(-10d);
Lats.add(-10d);
Lons.add(10d);
Lats.add(-10d);
map.addShape(new MapShape(ObjectID.Shape,Lons,Lats,Color.BLACK));
}
- The Base of all the Objects on the map
-
- set/get name - the name of the object
- set/get zoom - the current zoom level of the object
- set/get x and y - the x and y of that object in the map panel
- set/get id - this is a way to tell the differents between tiles and everything else
<dt><h3>MapPoint</h3></dt>
<dd>The Base for all the points</dd>
<dt><h3>MapShape</h3></dt>
<dd>The Base for all the shapes</dd>
<dt><h3>this is the Map Panel</h3></dt>
<dd><img src="https://github.com/Megamanjoker/MapPanelBean/blob/master/Pictures%20of%20the%20MapPanel/MapPanelScreenShot.png?raw=true" alt="Map Panel Screen Shot with no shapes or points" height="250" width="400"></dd>
<dt><h3>You can add points!</h3></dt>
<dd><img src="https://github.com/Megamanjoker/MapPanelBean/blob/master/Pictures%20of%20the%20MapPanel/MapPanelScreenShotWithPoint.png?raw=true" alt="Map Panel Screen Shot with a point" height="250" width="400"></dd>
<dt><h3>You can add shapes!</h3></dt>
<dd><img src="https://github.com/Megamanjoker/MapPanelBean/blob/master/Pictures%20of%20the%20MapPanel/MapPanelScreenShotWithAShape.png?raw=true" alt="Map Panel Screen Shot with a shape" height="250" width="400"></dd>
<dt><h3>You want both, go right a head!</h3></dt>
<dd><img src="https://github.com/Megamanjoker/MapPanelBean/blob/master/Pictures%20of%20the%20MapPanel/MapPanelScreenShotWithPointAndShape.png?raw=true" alt="Map Panel Screen Shot with a shape and point" height="250" width="400"></dd>