update for reorder and location points
This commit is contained in:
@ -9,9 +9,12 @@ class BaseLayer extends StatelessWidget {
|
||||
return TileLayerWidget(
|
||||
options: TileLayerOptions(
|
||||
backgroundColor: Colors.transparent,
|
||||
urlTemplate: 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
//urlTemplate: 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
urlTemplate: 'https://cyberjapandata.gsi.go.jp/xyz/std/{z}/{x}/{y}.png',
|
||||
//urlTemplate: 'https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}',
|
||||
subdomains: ['a', 'b', 'c'],
|
||||
//subdomains: ['a', 'b', 'c'],
|
||||
//subdomains: ['TileMatrix', 'TileCol', 'TileRow'],
|
||||
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@ -74,6 +74,7 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
||||
return indexController.rog_mode == 0 ? detailsSheet(context) : destinationSheet(context);
|
||||
}
|
||||
|
||||
// Show destination detais
|
||||
SingleChildScrollView destinationSheet(BuildContext context) {
|
||||
return SingleChildScrollView(
|
||||
child: Column(
|
||||
@ -136,31 +137,31 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
||||
],
|
||||
),
|
||||
Obx(() =>
|
||||
indexController.currentDestinationFeature[0].address!.isNotEmpty ?
|
||||
indexController.currentDestinationFeature[0].address != null && indexController.currentDestinationFeature[0].address!.isNotEmpty ?
|
||||
getDetails(context, "address".tr, indexController.currentDestinationFeature[0].address! ?? '')
|
||||
:
|
||||
Container(width: 0.0, height: 0,),
|
||||
),
|
||||
Obx(() =>
|
||||
indexController.currentDestinationFeature[0].phone!.isNotEmpty ?
|
||||
indexController.currentDestinationFeature[0].phone != null && indexController.currentDestinationFeature[0].phone!.isNotEmpty ?
|
||||
getDetails(context, "telephone".tr, indexController.currentDestinationFeature[0].phone! ?? '')
|
||||
:
|
||||
Container(width: 0.0, height: 0,),
|
||||
),
|
||||
Obx(() =>
|
||||
indexController.currentDestinationFeature[0].email!.isNotEmpty ?
|
||||
indexController.currentDestinationFeature[0].email != null && indexController.currentDestinationFeature[0].email!.isNotEmpty ?
|
||||
getDetails(context, "email".tr, indexController.currentDestinationFeature[0].email! ?? '')
|
||||
:
|
||||
Container(width: 0.0, height: 0,),
|
||||
),
|
||||
Obx(() =>
|
||||
indexController.currentDestinationFeature[0].webcontents!.isNotEmpty ?
|
||||
indexController.currentDestinationFeature[0].webcontents != null && indexController.currentDestinationFeature[0].webcontents!.isNotEmpty ?
|
||||
getDetails(context, "web".tr, indexController.currentDestinationFeature[0].webcontents! ?? '', isurl: true)
|
||||
:
|
||||
Container(width: 0.0, height: 0,),
|
||||
),
|
||||
Obx(() =>
|
||||
indexController.currentDestinationFeature[0].videos!.isNotEmpty ?
|
||||
indexController.currentDestinationFeature[0].videos != null && indexController.currentDestinationFeature[0].videos!.isNotEmpty ?
|
||||
getDetails(context, "video".tr, indexController.currentDestinationFeature[0].videos! ?? '', isurl: true)
|
||||
:
|
||||
Container(width: 0.0, height: 0,),
|
||||
@ -185,6 +186,7 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
||||
);
|
||||
}
|
||||
|
||||
// show add location details
|
||||
SingleChildScrollView detailsSheet(BuildContext context) {
|
||||
return SingleChildScrollView(
|
||||
child: Column(
|
||||
@ -336,7 +338,8 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
||||
Container(width: 0.0, height: 0,),
|
||||
],
|
||||
),
|
||||
)
|
||||
),
|
||||
Text(indexController.currentFeature[0].properties!["cp"].toString()),
|
||||
],
|
||||
),
|
||||
)
|
||||
@ -381,6 +384,9 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
||||
photos: indexController.currentFeature[0].properties!["photos"],
|
||||
checkin_radious: indexController.currentFeature[0].properties!["checkin_radious"],
|
||||
auto_checkin: indexController.currentFeature[0].properties!["auto_checkin"] == true ? 1 : 0,
|
||||
cp: indexController.currentFeature[0].properties!["cp"],
|
||||
checkin_point: indexController.currentFeature[0].properties!["checkin_point"],
|
||||
buy_point: indexController.currentFeature[0].properties!["buy_point"],
|
||||
selected: false,
|
||||
checkedin: false
|
||||
);
|
||||
|
||||
@ -84,42 +84,6 @@ class MapWidget extends StatelessWidget {
|
||||
_popupController
|
||||
.hideAllPopups(), // Hide popup when the map is tapped.
|
||||
),
|
||||
layers: [
|
||||
// MarkerLayerOptions(
|
||||
// markers: indexController.locations[0].collection.map((i) {
|
||||
// print("i si ${i.properties!['location_id']}");
|
||||
// GeoJsonMultiPoint p = i.geometry as GeoJsonMultiPoint;
|
||||
// print("lat is ${p.geoSerie!.geoPoints[0].latitude} and lon is ${p.geoSerie!.geoPoints[0].longitude}");
|
||||
// return Marker(
|
||||
// anchorPos: AnchorPos.align(AnchorAlign.center),
|
||||
// height: 70.0,
|
||||
// width: 70.0,
|
||||
// point: LatLng(p.geoSerie!.geoPoints[0].latitude, p.geoSerie!.geoPoints[0].longitude),
|
||||
// builder: (ctx) =>
|
||||
// IconButton(
|
||||
// icon: const Icon(Icons.pin_drop),
|
||||
// tooltip: 'Increase volume by 10',
|
||||
// onPressed: () {
|
||||
// GeoJsonFeature? fs = indexController.getFeatureForLatLong(p.geoSerie!.geoPoints[0].latitude, p.geoSerie!.geoPoints[0].longitude);
|
||||
// print(fs);
|
||||
// if(fs != null){
|
||||
// if(indexController.currentFeature.length > 0) {
|
||||
// indexController.currentFeature.clear();
|
||||
// }
|
||||
// indexController.currentFeature.add(fs);
|
||||
// indexController.getAction();
|
||||
|
||||
// showModalBottomSheet(context: context, isScrollControlled: true,
|
||||
// builder:((context) => BottomSheetWidget())
|
||||
// );
|
||||
// }
|
||||
// },
|
||||
// ),
|
||||
|
||||
// );
|
||||
// }).toList(),
|
||||
// ),
|
||||
],
|
||||
children: [
|
||||
BaseLayer(),
|
||||
LocationMarkerLayerWidget(),
|
||||
@ -167,7 +131,7 @@ class MapWidget extends StatelessWidget {
|
||||
height: 22.0,
|
||||
width: 22.0,
|
||||
point: LatLng(p.geoSerie!.geoPoints[0].latitude, p.geoSerie!.geoPoints[0].longitude),
|
||||
builder: (ctx) => Icon(Icons.pin_drop),
|
||||
//builder: (ctx) => Icon(Icons.pin_drop),
|
||||
// builder: (ctx) => i.properties!["category"] != null ?
|
||||
// ImageIcon(
|
||||
// AssetImage("assets/images/${i.properties!["category"]}.png"),
|
||||
@ -175,7 +139,22 @@ class MapWidget extends StatelessWidget {
|
||||
// size:12.0,
|
||||
// )
|
||||
// : Icon(Icons.pin_drop),
|
||||
|
||||
builder: (ctx){
|
||||
return Container(
|
||||
width: 7,
|
||||
height: 7,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: Colors.transparent,
|
||||
border: Border.all(
|
||||
color: Colors.red,
|
||||
width: 3,
|
||||
style: BorderStyle.solid
|
||||
)
|
||||
),
|
||||
child: Icon(Icons.circle,size: 10.0,)
|
||||
);
|
||||
},
|
||||
);
|
||||
}).toList(),
|
||||
builder: (context, markers) {
|
||||
|
||||
Reference in New Issue
Block a user