[ Whereis® API Home ] [ Developers' Guide ] [ Layers ]
The EMS JavaScript API supplies a set of standard and semi-customisable icons ready for you to use. Alternatively, you can create your own design as a gif, jpg, or png and make it available to the API via its URL.
Icons are defined as functions (factory methods), which return the icon that the function represents.
| Icon | Name | Sample JavaScript Code | Example |
![]() | Blue crosshairs / hover | EMS.Icon.crosshair() | Map with crosshair markers |
![]() | Red crosshairs / hover | EMS.Icon.crosshair(EMS.Color.RED) | Map with crosshair markers |
![]() | Green crosshairs / hover | EMS.Icon.crosshair(EMS.Color.GREEN) | Map with crosshair markers |
![]() | Start icon | EMS.Icon.start() | |
![]() | End icon | EMS.Icon.end() | |
![]() | First via point | EMS.Icon.via(1) | |
![]() | Second via point | EMS.Icon.via(2) | |
![]() | Third via point | EMS.Icon.via(3) | |
![]() | Fourth via point | EMS.Icon.via(4) | |
![]() | Fifth via point | EMS.Icon.via(5) | |
![]() | "Point of Interest" Marker | var icon = EMS.Icon.poi( new EMS.Color("DEDEDE"), // Text colorEMS.Gradient.GREEN, // Background gradient color new EMS.Gradient("1D4242", "71C9C1")); // Hover gradient | Map with POI Markers example |
![]() | "MultiPOI" grouping of 10 POI markers, usually of the same type | Cluster Marker | |
![]() | "Babushka" grouping of 10 POI markers of different types | Map with styled cluster markers |
Custom icons
You can create your own icon design by referencing an online gif, jpg, or png, by passing in its URL to the following constructor.
new OpenLayers.Icon(<url>)












