You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> Leaflet is the leading open-source JavaScript library for mobile-friendly interactive maps. Weighing just about 38 KB of JS, it has all the mapping features most > developers ever need.
@@ -17,12 +18,12 @@ First, you need to initialize an instance of `JLMapView`:
17
18
```java
18
19
finalJLMapView map =JLMapView
19
20
.builder()
20
-
.mapType(JLProperties.MapType.DARK)
21
-
.accessToken(ACCESS_TOKEN)
21
+
.mapType(JLProperties.MapType.OSM_MAPNIK)
22
+
.showZoomController(true)
22
23
.startCoordinate(JLLatLng.builder()
23
-
.lat(43.54)
24
-
.lng(22.54)
25
-
.build())
24
+
.lat(51.044)
25
+
.lng(114.07)
26
+
.build())
26
27
.build();
27
28
28
29
```
@@ -31,6 +32,8 @@ Based on Leaflet JS, you can interact with map in different layers. in this proj
31
32
*`map` for direct changes on map
32
33
*`map.getUiLayer()` for changes on UI layer like markers.
33
34
*`map.getVectorLayer()` represents the Vector layer on Leaflet map.
35
+
*`map.getControlLayer()` represents the control layer for setting the zoom level.
36
+
*`map.getGeoJsonLayer()` represents the GeoJson layer.
34
37
35
38
36
39
### Map functions
@@ -43,8 +46,7 @@ Some map view functionalities are available in map layer like `setView` or `setM
You can add GeoJson data from three different sources:
145
+
* From a file using `map.getGeoJsonLayer().addFromFile([FILE])`
146
+
* From a URL using `map.getGeoJsonLayer().addFromUrl([URL])`
147
+
* From a GeoJson content `map.getGeoJsonLayer().addFromContent([CONTENT])`
119
148
### Styling
120
149
121
150
You can pass `JLOptions` to each method for changing the default style!
@@ -133,23 +162,35 @@ You can pass `JLOptions` to each method for changing the default style!
133
162
);
134
163
```
135
164
136
-
For the map itself, you can choose between these themes:
165
+
For the map itself, you can choose between themes available in `JLProperties.MapType` class. The `JLProperties.MapType.OSM_MAPNIK` is available to be used without any access key but for the rest of them, you need to define your own map using `JLProperties.MapType` and passing proper list of key-values containing all the necessary access keys.
166
+
```java
167
+
JLProperties.MapType myMapType = new JLProperties.MapType("HEREv3.terrainDay",
**Disclaimer**: I've implemented this project for one of my academic paper in the area of geo-visualization. So, im not contributing actively!One more thing, I'm not a Javascript developer!
0 commit comments