Search Results

Search found 28584 results on 1144 pages for 'google map v3'.

Page 205/1144 | < Previous Page | 201 202 203 204 205 206 207 208 209 210 211 212  | Next Page >

  • can not find out if the div element is already set in body in chrome extension

    - by alpham8
    in my chrome extension I got an div, which I will add to the body of the current tab. I am listening to chrome.tabs.onUpdated. If this event is called, I execute a script inside content_scripts. In this function there I´ll wait till the document is ready with jQuery $(document).ready(...). I try to access $("#div").length and sometimes it returns 1 and sometimes 0. It should added to the body, if it´s not already there. For some strange reasons, the onUpdated event is called twice on each page reload. Actually I found no way to check safely if the div was already added.

    Read the article

  • Is it possible to have a composite index with a list property and a sort order?

    - by npdoty
    And if not, why not? The following index always fails for me, even though I had thought I could have a sort order with a list property as long as the index didn't sort or match against any other properties. - kind: Foo properties: - name: location_geocells - name: time direction: desc If such a composite index is allowed, are there any reasons that this might be failing for me? Do the existence of other indices on the same model increase the likelihood of this failure? Does the combination of a sort order with a list property require more than N entries, where N is the number of values in the list property? (If so, how many does it require?)

    Read the article

  • Can AutoMapper create a map for an interface and then map with a derived type?

    - by TheCloudlessSky
    I have an interface IFoo: public interface IFoo { int Id { get; set; } } And then a concrete implementation: public class Bar : IFoo { public int Id { get; set; } public string A { get; set; } } public class Baz : IFoo { public int Id { get; set; } public string B { get; set; } } I'd like to be able to map all IFoo but specifying their derived type instead: Mapper.CreateMap<int, IFoo>().AfterMap((id, foo) => foo.Id = id); And then map (without explicitly creating maps for Bar and Baz): var bar = Mapper.Map<int, Bar>(123); // bar.Id == 123 var baz = Mapper.Map<int, Baz>(456); // baz.Id == 456 But this doesn't work in 1.1. I know I could specify all Bar and Baz but if there are 20 of these, I'd like to not have to manage them and rather just have what I did above for creating the map. Is this possible?

    Read the article

  • Mapview on tablet: How can I center the map with an offset?

    - by Waza_Be
    Hint: Here is a similar post with HTML. In the current tablet implementation of my app, I have a fullscreen MapView with some informations displayed in a RelativeLayout on a left panel, like this: (My layout is quite trivial, and I guess there is no need to post it for readability) The problem comes when I want to center the map on a specific point... If I use this code: mapController.setCenter(point); I will of course get the point in the center of the screen and not in the center of the empty area. I have really no idea where I could start to turn the offset of the left panel into map coordinates... Thanks a lot for any help or suggestion

    Read the article

  • Jquery in chrome plugin

    - by Cyclone
    There is jquery on the page my script is trying to access, and the code I am trying to execute runs fine in console. However, when I use chrome.tabs.executeScript on that single tab, it says that $ is undefined. How can I fix this? Thanks for the help!

    Read the article

  • map.resources, :as => root?

    - by Newy
    I'd like to map my Users to root - so '/:id'. I do the following now map.connect ':id', :controller = 'users', :action = 'show' ... but I'd also like the links that are generated by Rails to have this format. Can I do a map.resources ... :as = :root or something similar?

    Read the article

  • Tabs.url is undefined

    - by Notionwork
    I have no clue what I'm doing wrong here! This should be working I believe. I'm writing a chrome extension and this should get the current tab's url and set the html of #current-tab to the url (for testing purposes). The code successfully gets to the callback, but it says that tab.url is undefined when I put it in an alert box, and it does not put it's value in #current-tab. Here's the code I have: $('#get-tab').click(function(){ chrome.tabs.query({"active" : true}, function(tab){ for (var i = 0; i < tab.length; i++) { alert(tab.url); $('#current-tab').append(tab.url); }; }); });

    Read the article

  • how do I instrospect appengine's datastore models?

    - by python for ever
    in order to dynamically create a form, i have to find the property types of a model's properties at runtime. appengine docs says that Model.properties() will return a dictionary of properties name and their class type. when i use this method in my code, only the name is returned and the classtype value is always empty.

    Read the article

  • Routing to a Controller with no View in Angular

    - by Rick Strahl
    I've finally had some time to put Angular to use this week in a small project I'm working on for fun. Angular's routing is great and makes it real easy to map URL routes to controllers and model data into views. But what if you don't actually need a view, if you effectively need a headless controller that just runs code, but doesn't render a view?Preserve the ViewWhen Angular navigates a route and and presents a new view, it loads the controller and then renders the view from scratch. Views are not cached or stored, but displayed and then removed. So if you have routes configured like this:'use strict'; // Declare app level module which depends on filters, and services window.myApp = angular.module('myApp', ['myApp.filters', 'myApp.services', 'myApp.directives', 'myApp.controllers']). config(['$routeProvider', function($routeProvider) { $routeProvider.when('/map', { template: "partials/map.html ", controller: 'mapController', reloadOnSearch: false, animation: 'slide' }); … $routeProvider.otherwise({redirectTo: '/map'}); }]); Angular routes to the mapController and then re-renders the map.html template with the new data from the $scope filled in.But, but… I don't want a new View!Now in most cases this works just fine. If I'm rendering plain DOM content, or textboxes in a form interface that is all fine and dandy - it's perfectly fine to completely re-render the UI.But in some cases, the UI that's being managed has state and shouldn't be redrawn. In this case the main page in question has a Google Map on it. The map is  going to be manipulated throughout the lifetime of the application and the rest of the pages. In my application I have a toolbar on the bottom and the rest of the content is replaced/switched out by the Angular Views:The problem is that the map shouldn't be redrawn each time the Location view is activated. It should maintain its state, such as the current position selected (which can move), and shouldn't redraw due to the overhead of re-rendering the initial map.Originally I set up the map, exactly like all my other views - as a partial, that is rendered with a separate file, but that didn't work.The Workaround - Controller Only RoutesThe workaround for this goes decidedly against Angular's way of doing things:Setting up a Template-less RouteIn-lining the map view directly into the main pageHiding and showing the map view manuallyLet's see how this works.Controller Only RouteThe template-less route is basically a route that doesn't have any template to render. This is not directly supported by Angular, but thankfully easy to fake. The end goal here is that I want to simply have the Controller fire and then have the controller manage the display of the already active view by hiding and showing the map and any other view content, in effect bypassing Angular's view display management.In short - I want a controller action, but no view rendering.The controller-only or template-less route looks like this: $routeProvider.when('/map', { template: " ", // just fire controller controller: 'mapController', animation: 'slide' });Notice I'm using the template property rather than templateUrl (used in the first example above), which allows specifying a string template, and leaving it blank. The template property basically allows you to provide a templated string using Angular's HandleBar like binding syntax which can be useful at times. You can use plain strings or strings with template code in the template, or as I'm doing here a blank string to essentially fake 'just clear the view'. In-lined ViewSo if there's no view where does the HTML go? Because I don't want Angular to manage the view the map markup is in-lined directly into the page. So instead of rendering the map into the Angular view container, the content is simply set up as inline HTML to display as a sibling to the view container.<div id="MapContent" data-icon="LocationIcon" ng-controller="mapController" style="display:none"> <div class="headerbar"> <div class="right-header" style="float:right"> <a id="btnShowSaveLocationDialog" class="iconbutton btn btn-sm" href="#/saveLocation" style="margin-right: 2px;"> <i class="icon-ok icon-2x" style="color: lightgreen; "></i> Save Location </a> </div> <div class="left-header">GeoCrumbs</div> </div> <div class="clearfix"></div> <div id="Message"> <i id="MessageIcon"></i> <span id="MessageText"></span> </div> <div id="Map" class="content-area"> </div> </div> <div id="ViewPlaceholder" ng-view></div>Note that there's the #MapContent element and the #ViewPlaceHolder. The #MapContent is my static map view that is always 'live' and is initially hidden. It is initially hidden and doesn't get made visible until the MapController controller activates it which does the initial rendering of the map. After that the element is persisted with the map data already loaded and any future access only updates the map with new locations/pins etc.Note that default route is assigned to the mapController, which means that the mapController is fired right as the page loads, which is actually a good thing in this case, as the map is the cornerstone of this app that is manipulated by some of the other controllers/views.The Controller handles some UISince there's effectively no view activation with the template-less route, the controller unfortunately has to take over some UI interaction directly. Specifically it has to swap the hidden state between the map and any of the other views.Here's what the controller looks like:myApp.controller('mapController', ["$scope", "$routeParams", "locationData", function($scope, $routeParams, locationData) { $scope.locationData = locationData.location; $scope.locationHistory = locationData.locationHistory; if ($routeParams.mode == "currentLocation") { bc.getCurrentLocation(false); } bc.showMap(false,"#LocationIcon"); }]);bc.showMap is responsible for a couple of display tasks that hide/show the views/map and for activating/deactivating icons. The code looks like this:this.showMap = function (hide,selActiveIcon) { if (!hide) $("#MapContent").show(); else { $("#MapContent").hide(); } self.fitContent(); if (selActiveIcon) { $(".iconbutton").removeClass("active"); $(selActiveIcon).addClass("active"); } };Each of the other controllers in the app also call this function when they are activated to basically hide the map and make the View Content area visible. The map controller makes the map.This is UI code and calling this sort of thing from controllers is generally not recommended, but I couldn't figure out a way using directives to make this work any more easily than this. It'd be easy to hide and show the map and view container using a flag an ng-show, but it gets tricky because of scoping of the $scope. I would have to resort to storing this setting on the $rootscope which I try to avoid. The same issues exists with the icons.It sure would be nice if Angular had a way to explicitly specify that a View shouldn't be destroyed when another view is activated, so currently this workaround is required. Searching around, I saw a number of whacky hacks to get around this, but this solution I'm using here seems much easier than any of that I could dig up even if it doesn't quite fit the 'Angular way'.Angular nice, until it's notOverall I really like Angular and the way it works although it took me a bit of time to get my head around how all the pieces fit together. Once I got the idea how the app/routes, the controllers and views snap together, putting together Angular pages becomes fairly straightforward. You can get quite a bit done never going beyond those basics. For most common things Angular's default routing and view presentation works very well.But, when you do something a bit more complex, where there are multiple dependencies or as in this case where Angular doesn't appear to support a feature that's absolutely necessary, you're on your own. Finding information on more advanced topics is not trivial especially since versions are changing so rapidly and the low level behaviors are changing frequently so finding something that works is often an exercise in trial and error. Not that this is surprising. Angular is a complex piece of kit as are all the frameworks that try to hack JavaScript into submission to do something that it was really never designed to. After all everything about a framework like Angular is an elaborate hack. A lot of shit has to happen to make this all work together and at that Angular (and Ember, Durandel etc.) are pretty amazing pieces of JavaScript code. So no harm, no foul, but I just can't help feeling like working in toy sandbox at times :-)© Rick Strahl, West Wind Technologies, 2005-2013Posted in Angular  JavaScript   Tweet !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs"); (function() { var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; po.src = 'https://apis.google.com/js/plusone.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); })();

    Read the article

  • jQuery selector issue finding image with usemap attribute

    - by Greg K
    I have an image map in my page: <div id="books"> <img src="images/books.png" width="330" height="298" border="0" \ usemap="#map_books" /> <map name="map_books" id="map_books" alt="books"> <area shape="poly" coords="17,73,81,288,210,248,254,264, ..." \ href="/about" alt="books" /> </map> </div> I have a function that tries to find the image in the document using this map: function(elemId) { // elemId = "#map_books" if ($(elemId).attr("tagName") == "MAP") { // find image using this map var selector = "img [usemap=\\" + elemId + "]"; var img = $(selector); if (img.length == 0) { console.log("Could not find image using " + selector); } } It fails to find the image. Could not find image using img [usemap=\#map_books] I've escaped the elemId because it starts with a hash and tried variations of selectors. $("img [usemap$=" + elemId.substring(1) + "]") $("img").find("[usemap=\\" + elemId + "]") Neither find the image. Any ideas?

    Read the article

  • 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

  • New article available in "SOA Suite Essentials for WLI Users" series: Dynamic Data Lookup in a Busin

    - by simone.geib
    It is my pleasure to announce the publishing of another article in our "SOA Suite Essentials for WLI Users" series: "Dynamic Data Lookup in a Business Process: Meta Data Cache Control in Oracle WebLogic Integration and Domain Value Maps in SOA Suite". This article explains how dynamic data can be retrieved in a business process using Domain Value Maps in SOA Suite and shows the similarities to the WLI XML MetaData Cache Control. Lots of customers have asked about this comparison and I hope they will find it useful. The article follows "Setting Web Service and JCA Adapter Endpoints Dynamically in Oracle SOA Suite" which describes how web services and JCA adapter endpoints in SOA Suite can be changed at run-time, and so completes the use case where a BPEL process writes to a file (via file adapter) and the output directory and the file name are set dynamically. Please let me know what you think about the series and this specific article.

    Read the article

  • Android 2.2 débarque au Google I/O : Flash, Microsoft Exchange et trois nouveaux outils de développe

    Mise à jour du 21/05/10 Android 2.2 débarque au Google I/O Flash, Microsoft Exchange et trois nouveaux outils de développement au menu de « Froyo » Quand un membre d'une équipe part pour une autre société et qu'il continue à dire que le projet sur lequel il travaillait est une petite révolution (lire ci-dessous), c'est qu'a priori il y a quelque chose à surveiller de près. Et visiblement c'est bien le cas avec « Froyo », nom de code du tout nouvel Android qui vient de débarquer officiellement au Google I/O. Que nous réserve Android 2.2 ? Des confirmations pour commencer. L'équipe de dévelop...

    Read the article

  • IASA Kansas City to host discussion on Google Fiber Project in Kansas City

    - by Patrick Liekhus
    One of the groups that I am currently President of (IASA Kansas City) is hosting an event by Rachel Hack (Google Community Manager) about the Google Fiber Project in Kansas City.  The event will be hosted at Balance Point’s office off 92nd and Ward Parkway on the Missouri side of the state line.  If you are interested, please check out further details here and get registered.  It is after work hours from 6 to 8 PM on the night of November 29, 2011.  It is free to attend and open to anyone who gets registered.  Come one, come all and bring your friends. Thanks

    Read the article

  • Howto install google-mock on Ubuntu 12.10

    - by user1459339
    I am having hard time trying to install Google C++ Mocking Framework. I have successfully run sudo apt-get install google-mock. Then I tried to compile this sample file #include "gmock/gmock.h" int main(int argc, char** argv) { ::testing::InitGoogleMock(&argc, argv); return RUN_ALL_TESTS(); } with g++ -lgmock main.cpp and these errors have shown main.cpp:(.text+0x1e): undefined reference to `testing::InitGoogleMock(int*, char**)' main.cpp:(.text+0x23): undefined reference to `testing::UnitTest::GetInstance()' main.cpp:(.text+0x2b): undefined reference to `testing::UnitTest::Run()' collect2: error: ld returned 1 exit status I guess the linker can not find the library files. Does anybody know how to fix this?

    Read the article

  • Google présente le Nexus S fabriqué par Samsung, tournant sous Android 2.3 et équipé du NFC

    Google présente le Nexus S fabriqué par Samsung, au design épuré et équipé du NFC Mise à jour du 07.12.2010 par Katleen Cette fois-ci, c'est officiel. Le Nexus One aura un successeur, et c'est bel et bien cet appareil qu'Eric Schmidt avait furtivement montré il y a quelques semaines lors d'une conférence. Le second smartphone estampillé Google a été fabriqué par Samsung, qui a du le fabriquer en respectant scrupuleusement un cahier des charges très précis, en matière de hardware et de design. Son exclusivité ? Etre le premier à tourner sous Android 2.3 (Gingerbread) en version "pure" (non remodelée par les opérateurs, ni par Samsung). Autre grand pas en avant : l'inclusion d...

    Read the article

  • How to remove google ads virus in Internet Explorer?

    - by msbg
    I picked up some adware that adds irrelevant advertisements to Google and Wikipedia. I have scanned with MalwareBytes, Windows Defender (Which is the same as MSE in Windows 8), Ad Aware, Spybot, and McAfee, which found no results. This only occurs in Internet Explorer 10, not in Firefox or Iron. I would like to keep IE10, I think it is a major improvement from previous versions. Any ideas on how to remove the adware?

    Read the article

  • What can be the reason that Google Chrome does not have print preview?

    - by eSKay
    I am not looking for a subtitute or a hack to get a print preview, but just wondering what the possible reasons could be for Google leaving this essential tool out from an excellent browser? They are adding this functionality from Chrome 6, but the question still remains - why not uptil now? Print preview is one of the essential features. There must be some good reason.

    Read the article

  • Level Editor + Game -> Duplicating rendering/game specific code?

    - by Utkarsh Sinha
    I've been reading about how to design code for a game. One thing I haven't been able to figure out is - how do you manage writing an outside-game level editor (not an 'in-game level editor') without 'copying' code from the game? For example, you might have to copy all code about the different types of entities you can have. You'll have to add the game rendering code. My guess is this can be done by making a DLL out of the 'engine' part of the game. Then, share it between the actual game and the level editor. Or is there a better/easier way to do this?

    Read the article

  • What are some useful things you can do with Mvc Modelbinders?

    - by George Mauer
    It occurs to me that the ModelBinder mechanism in ASP MVC public interface IModelBinder { object BindModel(System.Web.Mvc.ControllerContext controllerContext, System.Web.Mvc.ModelBindingContext bindingContext); } Is insanely powerful. What are some cool uses of this mechanism that you've done/seen? I guess since the concept is similar in other frameworks there's no reason to limit it to Asp Mvc

    Read the article

  • Will Google penalize subdomains if content is nearly identical

    - by John Pham
    I have created a subdomain for a town in San Diego that's ranking very well for it's keywords: http://carmelvalleymortgage.loanrebateinc.com/ I want to replicate this subdomain's content for another town in San Diego: http://sandiego.mortgage.loanrebateinc.com/ I will edit the text, tags, image files specific to each town, otherwise the verbiage will be identical. Question: Will Google penalize the main site? Will Google penalize the subdomains and list the content as spam? If yes to either 1 or 2, what strategies can I implement to prevent this? I'm using WordPress.

    Read the article

< Previous Page | 201 202 203 204 205 206 207 208 209 210 211 212  | Next Page >