Are you a web developer? Are you looking to integrate rich maps into your website? Today we are releasing the new JavaScript API for UMapper embeds that allows for a higher level of control over your maps. For example, you can zoom, pan, change map provider and open info windows (and much more) by calling various methods from the HTML page.
In order to take advantage of this functionality, you have to have some familiarity with JavaScript. To get you going we created a simple usage example and a tutorial.
JavaScript API for Umapper Embeds
Info Window
- openInfoWindow(lat, lng, title, [content) - Opens InfoWindow at the specified point
- openInfoWindowById(id, [type]) - Opens InfoWindow for the specified overlay
- closeInfoWindow() - Closes active InfoWindow
View
- setCenter(lat, lng, [zoom]) - Sets new map center and zoom level
- setZoom(zoom) - Sets new map zoom
- getCenter() - Returns current map center {lat,lng}
- getZoom() - Returns current map zoom
- zoomIn() - Zooms the map in
- zoomOut() - Zooms the map out
Map Types & Providers
- setMapType(name) - Sets the map type by name
- setProvider(name) - Sets the map provider by alias name
- getMapType() - Returns current map type name
- getProvider() - Returns current provider alias name
- getMapTypes() - Returns Array of map types available with current provider
- getProviders() - Returns the list of provider aliases
Event Callbacks
- onMapReady() - Invoked when map enters READY state
- onUpdatePosition(lat, lng) - Invoked when map position changes
- onUpdateZoom(zoom) - Invoked when map zoom changes
- onUpdateMapType(mapType) - Invoked when map type changes
- onOverlayReady(id, type) - Invoked when an overlay enters READY state
Enumeration
- getOverlays(type, [layerId]) - Enumerates all the overlays in a single Array of Objects
- getOverlaysById(id, [type, layerId]) - Same as getOverlays but filtered by id
- getOverlay(id, [type, layerId]) - Returns a single Overlay by id
Please let us know if you find any bugs or have feature suggestions.

