Skip to content

Instantly share code, notes, and snippets.

NSString* pinImagePath = [[NSBundle mainBundle] pathForResource:@”pin” ofType:@”png”];
UIImage *pinImage = [[UIImage alloc] initWithContentsOfFile:pinImagePath];
MapPoint *mapPoint = [[[MapPoint alloc] initWithLatitude:-23.6390300 andLongitude:-46.698603] autorelease];
Pin *pin = [[Pin alloc] initWithImage:pinImage andPoint:mapPoint];
[mapTemplate addPin:pin];
[pin release];
[pinImage release];
MapTemplate map;
double latitude = -23.5703255;
double longitude = -45.6921585;
Point point = new Point(latitude, longitude);
Pin pin = new Pin(bitmap, point);
map.addPin(pin);
String token = ...//sua chave de acesso aqui
// Recupera uma instância
InformationWindow informationWindow = InformationWindow.getInstance(map);
// Atribui uma mensagem para ser exibida
informationWindow.setMessage("Minha mensagem");
// Posiciona num ponto específico
informationWindow.setPoint(myPoint);
MLInformationWindow *informationWindow = [MLInformationWindow instanceAssociatedWith:mapTemplate];
informationWindow.view = infoView;
[informationWindow show];
double latitude =-23.6390300 ;
double longitude = -46.698603;
MLMapPoint *mapPoint = [[[MLMapPoint alloc] initWithLatitude: latitude andLongitude:longitude];
[myMap startMapWithToken:<coloque_seu_token_aqui> onPoint: <ponto_inicial>];
[self.view addSubview:myMap];
MLMapTemplate *myMap = [[MLMapTemplate alloc] initWithFrame:frame];
CGRect frame = CGRectMake(0, 0, 320, 480);
double latitude = -23.65465;
double longitude = -46.45675;
Point point = new Point(latitude, longitude);
view.startMapOn(<coloque_seu_token_aqui>, <ponto_inicial>);