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

[TIMOB-12035]iOS:Check if annotation exist before selecting it. #76

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Resources/etc/local_webview.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>local webview</title>
<link rel="stylesheet" type="text/css" href="../test.css" />
<link rel="stylesheet" type="text/css" href="test.css" />
<script type="text/javascript" src="jquery-1.3.2.js"></script>
<meta name="format-detection" content="telephone=no"/>
</head>
Expand Down
5 changes: 5 additions & 0 deletions Resources/etc/test.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
body
{
font-size:14;
color:#336699;
}
10 changes: 8 additions & 2 deletions Resources/ui/common/baseui/map_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,18 +91,22 @@ function mapview(_args) {
var hyb = null;
var zoomin = null;
var zoomout = null;
var annotationsRemoved = false;

var wireClickHandlers = function() {
removeAll.addEventListener('click', function() {
mapview.removeAllAnnotations();
annotationsRemoved = true;
});

atl.addEventListener('click', function() {
// set location to atlanta
mapview.setLocation(regionAtlanta);

// activate annotation
mapview.selectAnnotation(mapview.annotations[0].title,true);
if(!annotationsRemoved){
mapview.selectAnnotation(atlanta,true);
}
Ti.API.error("CLICKED ATL");
});

Expand All @@ -112,7 +116,9 @@ function mapview(_args) {
mapview.setLocation(regionSV);

// activate annotation
mapview.selectAnnotation(mapview.annotations[1].title,true);
if(!annotationsRemoved){
mapview.selectAnnotation(apple,true);
}
});

sat.addEventListener('click',function() {
Expand Down