This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var divIdName = "divMap"; | |
var map = new MMap2(divIdName); | |
var point = new MPoint(-46.6520066, -23.5650127); | |
var zoomLevel = 8; | |
map.setCenter(point, zoomLevel); | |
var originStop = new MRouteStop(); | |
originStop.description = "Avenida Paulista, 1000 - São Paulo / SP"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var routeManager = new MRouteMannager(map); | |
routeManager.createRoute(routeStops, routeOptions, null, function (response) { | |
function getRouteTotals(routeTotalsResponse) { | |
var routeTotals = "[RouteTotals]"; | |
routeTotals += "<br/>"; | |
routeTotals += "totalDistance: " + routeTotalsResponse.totalDistance; | |
routeTotals += ", totalTime: " + routeTotalsResponse.totalTime; | |
routeTotals += ", totalFuelUsed: " + routeTotalsResponse.totalFuelUsed; | |
routeTotals += ", totaltollFeeCost: " + routeTotalsResponse.totaltollFeeCost; | |
routeTotals += ", totalFuelUsed: " + routeTotalsResponse.totalFuelUsed; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function setZoomCenter() { | |
function fitBoundsArray(points) { | |
var z = map.getZoomForPoints(points); | |
var b = LBS.Bounds.fromArray(points); | |
map.setZoom(z); | |
map.setCenter(b.getCenter()); | |
}; | |
fitBoundsArray(points); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function setCenterZoom() { | |
function fitBoundsArray(points) { | |
var z = map.getZoomForPoints(points); | |
var b = LBS.Bounds.fromArray(points); | |
map.setZoom(z); | |
map.setCenter(b.getCenter()); | |
}; | |
fitBoundsArray(points); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var divIdName = "divMap"; | |
var zoomLevel = 14; | |
var map; | |
var points = []; | |
var polygon; | |
var lineColor = "#0000af"; | |
var lineWeight = 3; | |
var lineOpacity = .8; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var divIdName = "divMap"; | |
var zoomLevel = 14; | |
var map; | |
var points = []; | |
var polygon; | |
var lineColor = "#0000af"; | |
var lineWeight = 3; | |
var lineOpacity = .8; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var divIdName = "divMap"; | |
var zoomLevel = 14; | |
var map; | |
var points = []; | |
var polygon; | |
var lineColor = "#0000af"; | |
var lineWeight = 3; | |
var lineOpacity = .8; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<uses-permission android:name="android.permission.INTERNET" /> | |
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> | |
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> | |
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> | |
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var icon = new MIcon(); | |
icon.image = "http://images-map.maplink.com.br/images/ico_marker_a.png"; | |
icon.iconAnchor = new MIconPoint(20, 40); | |
icon.infoWindowAnchor = new MIconPoint(40, 40); | |
icon.iconSize = new MSize(40, 40); | |
var routePoint = new MRoutePoint(); | |
routePoint.icon = icon; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSString* pinImagePath = [[NSBundle mainBundle] pathForResource:@"pin" ofType:@"png"]; | |
UIImage *pinImage = [[UIImage alloc] initWithContentsOfFile:pinImagePath]; | |
MLMapPoint *mapPoint = [[[MLMapPoint alloc] initWithLatitude:-23.6390300 andLongitude:-46.698603] autorelease]; | |
MLPin *pin = [[MLPin alloc] initWithImage:pinImage andPoint:mapPoint]; | |
[mapTemplate addPin:pin]; | |
[pin release]; | |
[pinImage release]; |