Skip to content

octavm/v-leaflet-rotatedmarker-parent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Leaflet.RotatedMarker wrappers for Vaadin & GWT

This project provides Java API for both client (GWT, with "g-" prefix) and server (Vaadin) side for the popular Leaflet.RotatedMarker add-on made by Benjamin Becquet.

Usage

LMap map = new LMap();
LRotatedMarker rotatedMarker = new LRotatedMarker(....);
roatatedMarker.setIcon(...);
rotatedMarker.setRotationAngle(45.0);
rotatedMarker.setRotationOrigin("center center");
map.addLayer(rotatedMarker);

API

It simply extends the LMarker class adding two new options:

Option Type Default Description
rotationAngle Double 0 Rotation angle, in degrees, clockwise.
rotationOrigin String 'bottom center' The rotation center, as a transform-origin CSS rule.

and two new methods:

Method Default value Parameter Type Returns Description
setRotationAngle(newAngle) 0.0 Double void Sets the rotation angle value in degrees, clockwise
setRotationOrigin(newOrigin) "bottom center" String void Sets the rotation origin value, as a transform-origin CSS rule.

The default rotationOrigin value will rotate around the bottom center point, corresponding to the "tip" of the marker for most commonly used icons. If your marker icon has no tip, or you want to rotate around its center, use center center.

Realeases can be downloaded form https://vaadin.com/directory

Vaadin API for Leaflet: V-Leaflet

During development you might need to have development version of v-leaflet, g-leaflet and possibly g-leaflet-draw as well.

The original Leaflet add-on library: Leaflet.rotatedmarker

The core slippy map library: LeafletJS

About

V-Leaflet plugin to enable the rotation of map marker icons

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published