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 loading second time #167

Closed
ammubasha opened this issue Aug 8, 2014 · 11 comments
Closed

map is not loading second time #167

ammubasha opened this issue Aug 8, 2014 · 11 comments
Milestone

Comments

@ammubasha
Copy link

after successful implmentation in android i tried the same in IOS. first time it is working fine second time the map in not showing..... map object is not null but still the map is not shown up. i even try refreshlayout still no luck....anything i need to do specific to IOS

@wf9a5m75
Copy link
Member

wf9a5m75 commented Aug 8, 2014

Could you show me your code?

@wf9a5m75
Copy link
Member

wf9a5m75 commented Aug 8, 2014

@ammubasha Could you test the code #118 ?

@ammubasha
Copy link
Author

function getMapLayout()
{
clearMap();
var div = document.getElementById("map_canvas");
// alert("map"+map);
map = plugin.google.maps.Map.getMap(div);
map.addEventListener(plugin.google.maps.event.MAP_READY, function
onMapInit(map) {
// The map is initialized, then show a map dialog
map.refreshLayout();
map.setVisible(true);
getMyLocation();
});
}

function clearMap(){
if(map!=null){
map.clear();
map.setVisible(false);
map.setDiv(null);

}

}

function getMyLocation() {
$('#listDet').css('display', 'none');
$('#gmap').css('display', 'block');

 // map.showDialog();
// var latLng = new plugin.google.maps.LatLng(38.9030076,35.8615186);

 map.getMyLocation(function(location) {


  map.addMarker({
    'position': location.latLng,
    'title': "You are here!",
    'icon': {
        'url': 'www/images/b7.png',
        'size': {
        'width': 30,
        'height': 40
        }
    }

  }, function(marker) {

    map.animateCamera({
        'target':location.latLng,
        'zoom': 17


    });
  });
});
}

> wrote:
> 
> Could you show me your code?
> 
> —
> Reply to this email directly or view it on GitHub
> https://github.com/wf9a5m75/phonegap-googlemaps-plugin/issues/167#issuecomment-51565926
> .

@wf9a5m75
Copy link
Member

wf9a5m75 commented Aug 8, 2014

Thank you very much!

@ammubasha
Copy link
Author

any suggestion on this?

On Fri, Aug 8, 2014 at 12:49 PM, Masashi Katsumata <notifications@github.com

wrote:

Thank you very much!


Reply to this email directly or view it on GitHub
#167 (comment)
.

@wf9a5m75
Copy link
Member

I reviewed map.getMap() action yesterday, and I probably fixed this issue in next release.

@wf9a5m75 wf9a5m75 added this to the v1.1.5 milestone Aug 29, 2014
@wf9a5m75
Copy link
Member

I added some code for v1.1.5, and it is now available.
I hope the code solves this issue.
Please try the latest version.

In order to update, remove the plugin at once, then add the plugin again.

$> cordova plugin rm plugin.google.maps
$> cordova plugin add plugin.google.maps --variable API_KEY_FOR_ANDROID= ... --variable API_KEY_FOR_IOS=...

@ammubasha
Copy link
Author

Thanks. we solved this somehow with dirty fix-:) anyhow will try the new
release

On Fri, Aug 29, 2014 at 10:46 PM, Masashi Katsumata <
notifications@github.com> wrote:

I added some code for v1.1.5, and it is now available.
I hope the code solves this issue.
Please try the latest version.

In order to update, remove the plugin at once, then add the plugin again.

$> cordova plugin rm plugin.google.maps
$> cordova plugin add plugin.google.maps --variable API_KEY_FOR_ANDROID= ... --variable API_KEY_FOR_IOS=...


Reply to this email directly or view it on GitHub
#167 (comment)
.

@wf9a5m75
Copy link
Member

@ammubasha Did you resolve this?
I'd like to close this issue if you resolve this.

@wf9a5m75
Copy link
Member

Please try the new version of the plugin.
This problem should be fixed. (I tested many times)
https://plus.google.com/112861993350247152906/posts/ber5LChbWkU

@wf9a5m75
Copy link
Member

The problem is fixed in v1.2.0

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

2 participants