Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map is not show in widget #2

Open
joshuajennysibbu opened this issue Jun 14, 2021 · 0 comments
Open

Map is not show in widget #2

joshuajennysibbu opened this issue Jun 14, 2021 · 0 comments

Comments

@joshuajennysibbu
Copy link

@joshuajennysibbu
Please try our sample app in flutter:
https://github.com/MapmyIndia/flutter-mapmyindia-gl

Thank for your reply its work...
But map is not shown...

import 'package:flutter/material.dart';
import 'package:mapmyindia_gl/mapmyindia_gl.dart';

class Maploader extends StatefulWidget {
@override
 _MaploaderState createState() => _MaploaderState();
 }

class _MaploaderState extends State<Maploader> {
 MapmyIndiaMapController mapController;

 void initState() {
   super.initState();
    MapmyIndiaAccountManager.setMapSDKKey('3xl4iy32ujvkiyyhkj6fepzn9orgkzrn');
    MapmyIndiaAccountManager.setRestAPIKey('4jpao9dnkkhiqn4fza9djv8lajdsvkvc');
    MapmyIndiaAccountManager.setAtlasClientId(
            'QuvH3MQYbAyBddPK28mF9pKpD3a9- 
     ygbtXQDawXSrK56XBN1V6gVb_bQ6RS9ZA9x0UiBF9HXUFov1wxNpEa8Efd1hUO2u-hm');
     MapmyIndiaAccountManager.setAtlasClientSecret(
       'kBW6kL4FZrvON15Wca3E_f98U12J7qubiUq-15rIr9dnhJ_XFvMaU7N-2aQp_Nr9yuX- 
      dLNon4xtpDVFUa4YiRTHaQyeircAbnDnf7248kI=');
    }

    maploads() {
// MapMyIndiaGeocoding("4jpao9dnkkhiqn4fza9djv8lajdsvkvc")
//     .getAddress(11.0168, 76.9558)
//     .then((getAddress) {
//   String address = getAddress.formattedAddress;
//   print(address);
// });

       MapmyIndiaMap(
       initialCameraPosition: CameraPosition(
          target: LatLng(25.321684, 82.987289),
          zoom: 14.0,
       ),
      onMapCreated: (map) => {
         mapController = map,
        mapController.animateCamera(
    CameraUpdate.newLatLngZoom(LatLng(25.321684, 82.987289), 0))
  },
  
     );

    }

    @override
   Widget build(BuildContext context) {

     return Container(
     child: maploads(),
       color: Colors.white,
    );
  }
   }

Map is not shown in widget...

Originally posted by @joshuajennysibbu in https://github.com/MapmyIndia/flutter-mapmyindia-gl/issues/1#issuecomment-859907715

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant