Search Results

Search found 3 results on 1 pages for 'mizakita'.

Page 1/1 | 1 

  • Create Marker Categories & Display Markers on Click Only

    - by MizAkita
    I am trying to create marker categories and display markers on click... For example, "Eat", "Banks", "Places of Interest" and clicking on them would produce only the markers in those categories. You can see it live HERE Here is a code snippet: //<![CDATA[ //<![CDATA[ var map = null; var gmarkers = []; var gicons = []; var icon = []; function initialize() { var myOptions = { zoom: 13, center: new google.maps.LatLng(37.979183,-121.302381), mapTypeControl: true, mapTypeControlOptions: {style: google.maps.MapTypeControlStyle.DROPDOWN_MENU}, navigationControl: true, mapTypeId: google.maps.MapTypeId.ROADMAP } map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); google.maps.event.addListener(map, 'click', function() { infowindow.close(); }); // Add markers to the map // Set up three markers with info windows ///////////////////////// EATS ////////////////////////////////////////////// var point = new google.maps.LatLng(37.988012,-121.311901); var image = 'icons/orangepointer.png'; var marker = createMarker(point,'<div style="width:205"><center><img src="icons/tigeryogurt.jpg" /></center><br><b>Tiger Yogurt</b><small><br>4343 Pacific Avenue<br>209.952.6042<br><br><a href="http://maps.google.com/maps?saddr=&daddr=' + point.toUrlValue() + '" target ="_blank">Get Directions<\/a></small><\/div>', image); // this will be gmarkers[0] var point = new google.maps.LatLng(37.987054,-121.311655); var image = 'icons/orangepointer.png'; var marker = createMarker(point,'<div style="width:205"><center><img src="icons/mwbakery.jpg" /></center><br><b>M&W Bakery<br>Cakes & Sandwiches</b><small><br>4343 Pacific Avenue<br>209.473.3828<br><br>On the web visit:<br><a href="http://www.mandwdutchamericanbakery.com" target ="_blank">MandWDutchAmericanBakery.com<\/a><br><br><a href="http://maps.google.com/maps?saddr=&daddr=' + point.toUrlValue() + '" target ="_blank">Get Directions<\/a></small><\/div>', image); // this will be gmarkers[1] Currently, all markers display. I can easily get the markers not to display... however, i am trying to have only categories display and individual listings to display on click only! CREATE MARKER FUNCTION: } var infowindow = new google.maps.InfoWindow( { size: new google.maps.Size(150,50) }); function triggerClick(i) { google.maps.event.trigger(gmarkers[i],"click") }; function createMarker(latlng, html, img) { var contentString = html; var marker = new google.maps.Marker({ position: latlng, map: map, icon: img, zIndex: Math.round(latlng.lat()*-100000)<<5 }); google.maps.event.addListener(marker, 'click', function() { infowindow.setContent(contentString); infowindow.open(map,marker); }); gmarkers.push(marker); }

    Read the article

  • Google Chart Number formatting

    - by MizAkita
    I need to format my pie and column charts to show the $ and comma in currency format ($###,###) when you hover over the charts. Right now, it is displaying the number and percentage but the number as #####.## here is my code. Any help would be appreciated. // Load the Visualization API and the piechart package. google.load('visualization', '1.0', {'packages':['corechart']}); // Set a callback to run when the Google Visualization API is loaded. google.setOnLoadCallback(drawChart); var formatter = new google.visualization.NumberFormat({ prefix: '$' }); formatter.format(data, 1); var options = { pieSliceText: 'value' }; // Callback that creates and populates a data table, // instantiates the pie chart, passes in the data and // draws it. function drawChart() { // REVENUE CHART - Create the data table. var data4 = new google.visualization.DataTable(); data4.addColumn('string', 'Status'); data4.addColumn('number', 'In Thousands'); data4.addRows([ ['Net tution & Fees', 213.818], ['Auxiliaries', 30.577], ['Government grants/contracts', 39.436], ['Private grants/gifts', 39.436], ['Investments', 10.083], ['Clinics', 14.353], ['Other', 5.337] ]); // EXPENSES CHART - Create the data table. var data5 = new google.visualization.DataTable(); data5.addColumn('string', 'Status'); data5.addColumn('number', 'Amount'); data5.addRows([ ['Instruction', 133.868], ['Sponsored Progams', 34.940], ['Auxiliaries', 30.064], ['Academic Support', 25.529], ['Depreciation & amortization', 18.548], ['Student Services', 22.626], ['Plant operations & maintenance', 18.105], ['Fundraising', 13.258], ['Geneal Administration', 11.628], ['Interest', 6.846], ['Student Aid', 1.886], ]); // ENDOWMENT CHART - Create the data table. var data6 = new google.visualization.DataTable(); data6.addColumn('string', 'Status'); data6.addColumn('number', 'In Millions'); data6.addRows([ ['2010', 178.7], ['2011', 211.693], ['2012', 199.3] ]); // Set REVENUE chart options var options4 = { is3D: true, fontName: 'Arial', colors:['#AFD8F8', '#F6BD0F', '#8BBA00', '#FF8E46', '#008E8E', '#CCCCCC', '#D64646', '#8E468E'], 'title':'', 'width':550, 'height':250}; // Set EXPENSES chart options var options5 = { is3D: true, fontName: 'Arial', colors:['#AFD8F8', '#F6BD0F', '#8BBA00', '#FF8E46', '#008E8E', '#CCCCCC', '#D64646', '#8E468E'], 'title':'', 'width':550, 'height':250}; // Set ENDOWMENT chart options var options6 = { is3D: true, fontName: 'Arial', colors:['#AFD8F8', '#F6BD0F', '#8BBA00', '#FF8E46', '#008E8E', '#CCCCCC', '#D64646', '#8E468E'], 'title':'', 'width':450, 'height':250}; // Instantiate and draw our chart, passing in some options. var chart4 = new google.visualization.PieChart(document.getElementById('chart_div4')); chart4.draw(data4, options4); var chart5 = new google.visualization.PieChart(document.getElementById('chart_div5')); chart5.draw(data5, options5); var chart6 = new google.visualization.ColumnChart(document.getElementById('chart_div6')); chart6.draw(data6, options6);}

    Read the article

  • Route Angular to New Controller after Login

    - by MizAkita
    I'm kind of stuck on how to route my angular app to a new controller after login. I have a simple app, that uses 'loginservice'... after logging in, it then routes to /home which has a different template from the index.html(login page). I want to use /home as the route that displays the partial views of my flightforms controllers. What is the best way to configure my routes so that after login, /home is the default and the routes are called into that particular templates view. Seems easy but I keep getting the /login page when i click on a link which is suppose to pass the partial view into the default.html template: var app= angular.module('myApp', ['ngRoute']); app.config(['$routeProvider', function($routeProvider) { $routeProvider.when('/login', { templateUrl: 'partials/login.html', controller: 'loginCtrl' }); $routeProvider.when('/home', { templateUrl: 'partials/default.html', controller: 'defaultCtrl' }); }]); flightforms.config(['$routeProvider', function($routeProvider){ //sub pages $routeProvider.when('/home', { templateUrl: 'partials/default.html', controller: 'defaultCtrl' }); $routeProvider.when('/status', { templateUrl: 'partials/subpages/home.html', controller: 'statusCtrl' }); $routeProvider.when('/observer-ao', { templateUrl: 'partials/subpages/aobsrv.html', controller: 'obsvaoCtrl' }); $routeProvider.when('/dispatch', { templateUrl: 'partials/subpages/disp.html', controller: 'dispatchCtrl' }); $routeProvider.when('/fieldmgr', { templateUrl: 'partials/subpages/fieldopmgr.html', controller: 'fieldmgrCtrl' }); $routeProvider.when('/obs-backoffice', { templateUrl: 'partials/subpages/obsbkoff.html', controller: 'obsbkoffCtrl' }); $routeProvider.when('/add-user', { templateUrl: 'partials/subpages/users.html', controller: 'userCtrl' }); $routeProvider.otherwise({ redirectTo: '/status' }); }]); app.run(function($rootScope, $location, loginService) { var routespermission=['/home']; //route that require login $rootScope.$on('$routeChangeStart', function(){ if( routespermission.indexOf($location.path()) !=-1) { var connected=loginService.islogged(); connected.then(function(msg) { if(!msg.data) $location.path('/login'); }); } }); }); and my controllers are simple. Here's a sample of what they look like: var flightformsControllers = angular.module('flightformsController', []); flightforms.controller('fieldmgrCtrl', ['$scope','$http','loginService', function($scope,loginService) { $scope.txt='You are logged in'; $scope.logout=function(){ loginService.logout(); } }]); Any ideas on how to get my partials to display in the /home default.html template would be appreciated.

    Read the article

1