Search Results

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

Page 57/1144 | < Previous Page | 53 54 55 56 57 58 59 60 61 62 63 64  | Next Page >

  • How do I detect a click event on a google map through an overlay?

    - by freddoo
    My problem is that I have a circle map overlay but I want to be able to move the circle by clicking the map to set the new center, the actual problem is that when I click on the overlay and call my method 'setCenter(overlay, latlng) ' , I get undefined latlang and a valid overlay. here is an example that can illustrate the problem, if you click the map a polygon is drawn and if you click inside the polygon no new polygon is drawn, if you click anywhere else on the map a polygon is drawn http://code.google.com/apis/maps/documentation/examples/polygon-simple.html I want to be able to click the polygon and draw a new one making them overlap thanks

    Read the article

  • defining < operator for map of list iterators

    - by Adrian
    I'd like to use iterators from an STL list as keys in a map. For example: using namespace std; list<int> l; map<list<int>::const_iterator, int> t; int main(int argv, char * argc) { l.push_back(1); t[l.begin()] = 5; } However, list iterators do not have a comparison operator defined (in contrast to random access iterators), so compiling the above code results in an error: /usr/include/c++/4.2.1/bits/stl_function.h:227: error: no match for ‘operator<’ in ‘__x < __y’ If the list is changed to a vector, a map of vector const_iterators compiles fine. What is the appropriate way to define the operator < for list::const_iterator?

    Read the article

  • how can i insert a new sitemap with google gdata api? it returns 400 bad request

    - by wingoo
    i try to insert a new sitemap to google using api, but i can't do it successful-_- this is the method var fullDomainUrl = "http://www.example.com/"; var entry = new SitemapsEntry(); entry.Id = new AtomId(fullDomainUrl + "sitemap.xml"); entry.Categories.Add(new AtomCategory("http://schemas.google.com/webmasters/tools/2007#site-info", new AtomUri("http://schemas.google.com/g/2005#kind"))); entry.SitemapType = "WEB"; myService.Insert(new Uri(string.Format("https://www.google.com/webmasters/tools/feeds/{0}/sitemaps/", HttpUtility.UrlEncode(fullDomainUrl))), entry); this will retuen a 400 bad requestand i try another method var settings = new RequestSettings("TesterApp1", domain.GoogleAuthToken, CommonService.GetRsaPrivateKey(Context)); var request = new WebmasterToolsRequest(settings); var sitemap = new Sitemap(); sitemap.Id = fullDomainUrl + "sitemap.xml"; sitemap.Categories.Add(new AtomCategory("http://schemas.google.com/webmasters/tools/2007#site-info", new AtomUri("http://schemas.google.com/g/2005#kind"))); sitemap.SitemapType = "WEB"; //request.AddSitemap(fullDomainUrl, sitemap); request.Insert(new Uri(string.Format("https://www.google.com/webmasters/tools/feeds/{0}/sitemaps/", HttpUtility.UrlEncode(fullDomainUrl))), sitemap); this also return a 400 bad request and then i try to use HttpWebRequest to post the atom to google,but it also return a 400 bad request(???") i can insert/update site successful,but can;t insert a new sitemap.. does any can give a right code with .net?

    Read the article

  • Copy an entity in Google App Engine datastore in Python without knowing property names at 'compile'

    - by Gordon Worley
    In a Python Google App Engine app I'm writing, I have an entity stored in the datastore that I need to retrieve, make an exact copy of it (with the exception of the key), and then put this entity back in. How should I do this? In particular, are there any caveats or tricks I need to be aware of when doing this so that I get a copy of the sort I expect and not something else. ETA: Well, I tried it out and I did run into problems. I would like to make my copy in such a way that I don't have to know the names of the properties when I write the code. My thinking was to do this: #theThing = a particular entity we pull from the datastore with model Thing copyThing = Thing(user = user) for thingProperty in theThing.properties(): copyThing.__setattr__(thingProperty[0], thingProperty[1]) This executes without any errors... until I try to pull copyThing from the datastore, at which point I discover that all of the properties are set to None (with the exception of the user and key, obviously). So clearly this code is doing something, since it's replacing the defaults with None (all of the properties have a default value set), but not at all what I want. Suggestions?

    Read the article

  • Google Chrome Extension - Help needed

    - by Jim-Y
    Im new on Google Chrome Extensions coding, and i have some basic questions. I want to make a Chrome Extension, and the scheme is the following: -a popup window, containing buttons and result fields (popup.html) -when a button is clicked, i want to trigger an event, this event should connect to a webserver (i make the servlet too), and gather information from the server. (XMLHttpRequest()) -after that, i want my extension to load the gathered information into one of the result fields. Simple, isn't it? But i have several problems, right at the beginning:( I started developing with reading tutorials, but i have fog on the main structure of an extension. Now, i started an app, containing a popup.html, manifest.json ... In popup.html theres a result field, and a button <div id="extension_container"> <div id="header"> <p id="intro">Result here</p> <button type="button" id="button">Click Me!</button> </div> <!-- END header --> <div id="content"> </div> <!-- END content --> When button is clicked, i trigger an event, handeled with jquery, code here: <script> $(document).ready(function(){ $("#button").click(function(){ $("#intro").text("Hello, im added"); alert("Clicked"); }); }); </script> And here comes the problem, in popup.html this doesnt work, if i load it to Chrome, nothing happens. Otherwise, if i open popup.html in browser, not as an extension, everything works fine. So, i think i have basic misunderstandings on extension structures, starting with background pages, background javascript and so on.. :( Could anyone help me?

    Read the article

  • Click GEvent.addListener with jquery

    - by Jason
    Created a google map with GMap2 and put pinpoints on there that open up a balloon with the address when the pinpoint is clicked. I would like users to be able to click text on the page itself and use jquery to open up the corresponding balloon. However I can't figure out the ID to use to call a jquery click event. Basically I've got a store listing down the left side and when user clicks store name I want it to open up the corresponding balloon. GEvent.addListener(marker_500, "click", function () { map.openInfoWindowHtml(point, myHtml); } Any idea what element tied to this click event is? Tried $("#marker_500").click(); And that doesn't work. Also tried alerting $(this).attr('id'); inside the click function and that is undefined. thanks jason

    Read the article

  • map integration in iphone application

    - by Filthy Night
    Hi Guyz, i want to integrate maps using map kit in iphone, and i am successful at that, but now the problem which i am facing is i have 2 locations coordinates, Location1 and Location2, now i want those two points to be shown on map but i want that they appear on the screen both at 1 time, means if they are very far then the zoom level goes to that point and show those two points on the map, if they are near to each other then zoom level shows from that angel (i mean very near). now i know that using longitude delta and latitude delta i can fix this problem, but i cant find a way to make it dynamic, so that i dont have to hardcode the delta value Any Help appreciated. Thanks

    Read the article

  • How to output KML by GAE

    - by Niklas R
    Hi I use KML for a google map where entities have a geopt.db coordinate and soft memory limit was exceeded with 213.465 MB after servicing 1 requests total. The log says /list.kml 200 13130ms 10211cpu_ms 4238api_cpu_ms The file list.kml which outputs about 455,7 KB is a template as follows <?xml version="1.0" encoding="UTF-8"?><kml xmlns="http:// www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http:// www.w3.org/2005/Atom"> <Document>{% for a in list %} <Placemark> <name> </name> <description> <![CDATA[<a href="http://{{host}}/{{a.key.id}}"> {{ a.title }} </a> <br/>{{a.text}}]]> </description> <Style> <IconStyle> <Icon> <href> http://www.google.com/intl/en_us/mapfiles/ms/icons/green-dot.png </href> </Icon> </IconStyle> </Style> <Point> <coordinates> {{a.geopt.lon|floatformat:2}},{{a.geopt.lat|floatformat:2}} </coordinates> </Point> </Placemark> {% endfor %} </Document> </kml> Is there a memory leak in the template or the python that passes the list variable? Can I improve using other template engine or other framework than default? Is kmz compression a good idea in this case? Thanks in advance for any suggestion where or how to change the code.

    Read the article

  • Illegal Argument Exception in Google Wave App

    - by Yoenhofen
    I'm writing a Google Wave robot and I just messed something up. It was working just fine but now I'm getting an IllegalArgument exception on the line that includes query.execute. Am I doing something stupid? I've seen several code samples very similar to what I'm doing. I can include the code of the WaveUpdate class if necessary. The intent here is to select all WaveUpdate members that have an updateDateTime in the last hour. PersistenceManager pm = PMF.get().getPersistenceManager(); try { Query query = pm.newQuery(WaveUpdate.class); query.setFilter("emailAddress > '' && updateDateTime > referenceDateTime"); query.declareParameters("java.util.Date referenceDateTime"); Calendar referenceDateTime = Calendar.getInstance(); referenceDateTime.add(Calendar.HOUR_OF_DAY, -1); List<WaveUpdate> updates = (List<WaveUpdate>) query.execute(referenceDateTime.getTime());

    Read the article

  • Google Spreadsheet API problem: memory exceeded

    - by Robbert
    Hi guys, Don't know if anyone has experience with the Google Spreadsheets API or the Zend_GData classes but it's worth a go: When I try to insert a value in a 750 row spreadsheet, it takes ages and then throws an error that my memory limit (which is 128 MB!) was exceeded. I also got this when querying all records of this spreadsheet but this I can imaging because it's quite a lot of data. But why does this happen when inserting a row? That's not too complex, is it? Here's the code I used: public function insertIntoSpreadsheet($username, $password, $spreadSheetId, $data = array()) { $service = Zend_Gdata_Spreadsheets::AUTH_SERVICE_NAME; $client = Zend_Gdata_ClientLogin::getHttpClient($username, $password, $service); $client->setConfig(array( 'timeout' => 240 )); $service = new Zend_Gdata_Spreadsheets($client); if (count($data) == 0) { die("No valid data"); } try { $newEntry = $service->insertRow($data, $spreadSheetId); return true; } catch (Exception $e) { return false; } }

    Read the article

  • Google Analytics Script inside XML File

    - by mnml
    Hi, I would like to know If I can add my ecommerce analytics tags inside an xml formated file? <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-XXXXX-X']); _gaq.push(['_trackPageview']); _gaq.push(['_addTrans', '1234', // order ID - required 'Acme Clothing', // affiliation or store name '11.99', // total - required '1.29', // tax '5', // shipping 'San Jose', // city 'California', // state or province 'USA' // country ]); // add item might be called for every item in the shopping cart // where your ecommerce engine loops through each item in the cart and // prints out _addItem for each _gaq.push(['_addItem', '1234', // order ID - required 'DD44', // SKU/code 'T-Shirt', // product name 'Green Medium', // category or variation '11.99', // unit price - required '1' // quantity - required ]); _gaq.push(['_trackTrans']); //submits transaction to the Analytics servers (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga); })(); </script>

    Read the article

  • Best way to model map values in Grails?

    - by Mulone
    Hi guys, I have to implement map values in my Grails app. I have a class that can contain 0..N OsmTags, and the key is unique. In Java I would model this with a Map in each object, but I don't know how to map classes in Grails. So I defined this class: class OsmTag { /** OSM tag name, e.g. natural */ String key /** OSM tag value, e.g. park */ String value static constraints = { key blank:false, size:2..80,matches:/[\S]+/, unique:false value blank:false, size:1..250,matches:/[\S]+/, unique:false } } That works ok, but it's actually quite ugly because the tag key is not unique. Is there a better way to model this issue? Cheers

    Read the article

  • why am I stuck on "Initiating update" when deploying to google

    - by michelle
    I've have not had any trouble deploying through eclipse until now. I'm guessing it might have to do with all the stuff I've added today a folder of .pdf and .tex files (in war/web-inf directory) a bit of JDO stuff and a servlet that reads the files in the directory and indexes them into the JDO Is there any way to find out what exactly is the problem? I currently get stuck at "Initiating update" and the stack trace say "ConnectionReset" Any helkp of imput will be appreciated, I really need to deploy this today, thanks! here's the deploy trace: Unable to update: java.net.SocketException: Connection reset at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at sun.net.www.protocol.http.HttpURLConnection.getChainedException(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) at java.net.HttpURLConnection.getResponseCode(Unknown Source) at com.google.appengine.tools.admin.ServerConnection.getAuthCookie(ServerConnection.java:315) at com.google.appengine.tools.admin.ServerConnection.authenticate(ServerConnection.java:219) at com.google.appengine.tools.admin.ServerConnection.send(ServerConnection.java:145) at com.google.appengine.tools.admin.ServerConnection.post(ServerConnection.java:81) at com.google.appengine.tools.admin.AppVersionUpload.send(AppVersionUpload.java:427) at com.google.appengine.tools.admin.AppVersionUpload.beginTransaction(AppVersionUpload.java:241) at com.google.appengine.tools.admin.AppVersionUpload.doUpload(AppVersionUpload.java:98) at com.google.appengine.tools.admin.AppAdminImpl.update(AppAdminImpl.java:56) at com.google.appengine.eclipse.core.proxy.AppEngineBridgeImpl.deploy(AppEngineBridgeImpl.java:271) at com.google.appengine.eclipse.core.deploy.DeployProjectJob.runInWorkspace(DeployProjectJob.java:148) at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Caused by: java.net.SocketException: Connection reset at java.net.SocketInputStream.read(Unknown Source) at java.io.BufferedInputStream.fill(Unknown Source) at java.io.BufferedInputStream.read1(Unknown Source) at java.io.BufferedInputStream.read(Unknown Source) at sun.net.www.http.HttpClient.parseHTTPHeader(Unknown Source) at sun.net.www.http.HttpClient.parseHTTP(Unknown Source) at sun.net.www.http.HttpClient.parseHTTP(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getHeaderFieldKey(Unknown Source) at com.google.appengine.tools.util.ClientCookieManager.readCookies(ClientCookieManager.java:123) at com.google.appengine.tools.admin.ServerConnection.connect(ServerConnection.java:340) at com.google.appengine.tools.admin.ServerConnection.getAuthCookie(ServerConnection.java:314) ... 11 more

    Read the article

  • Show users a list of unique items on Java Google App Engine

    - by James
    I've been going round in circles with what must be a very simple challenge but I want to do it the most efficient way from the start. So, I've watched Brett Slatkin's Google IO videos (2008 & 2009) about building scalable apps including http://www.youtube.com/watch?v=AgaL6NGpkB8 and read the docs but as a n00b, I'm still not sure. I'm trying to build an app on GAEJ similar to the original 'hotornot' where a user is presented with an item which they rate. Once they rate it, they are presented with another one which they haven't seen before. My question is this; is it most efficient to do a query up front to grab x items (say 100) and put them in a list (stored in memcache?) or is it better to simply make a query for a new item after each rating. To keep track of the items a user has seen, I'm planning to keep those items' keys in a list property of the user's entity. Does that sound sensible? I've really got myself confused about this so any help would be much appreciated.

    Read the article

  • How to sort a key of a map

    - by Tsuna Sawada
    How to sort (any kind of sorting) a key of a map(treemap or hashmap) i have a problem and it goes like this. i have a map that has a key of 27527-683, 27525-1179, 27525-1571, 27525-1813, 27525-4911, 27526-1303, 27526-3641, 27525-3989, 27525-4083, 27525-4670, 27526-4102, 27526-558, 27527-2411, 27527-4342 this is the list of keys and the value for each of the key is a list. now, how can i sort this key in ascending order by number. ex. if i want to sort : 1,2,11,20,31,3,10 i want to have as output is : 1,2,3,10,11,20,31 but when i use the autosort of treemap the output goes : 1,10,11,2,20,3,31 how can i sort it in ascending order by numeric? please help me. i can't think of anymore ways because this is my first time handling map and list

    Read the article

  • quick check on use of map api (android)

    - by Peter vdL
    When you use the Google map api, it is not part of the Android SDK, and you have to mention it in your manifest xml file. Do you have to do anything to access the jar file containing the map api code? Or is that automatically present on the device or emulator, the way the SDK code is? Do you need put the map api jar file in your class path, either when compiling or when executing? Or is it kept somewhere where it is already visible, and the requirement of an XML mention is merely to remind you of the licensing issue? Thanks, Peter

    Read the article

  • STL map containing references does not compile

    - by MTsoul
    The following: std::map<int, ClassA &> test; gives: error C2101: '&' on constant While the following std::map<ClassA &, int> test; gives error C2528: '_First' : pointer to reference is illegal The latter seems like map cannot contain a reference for the key value, since it needs to instantiate the class sometimes and a reference cannot be instantiated without an object. But why does the first case not work?

    Read the article

  • google map api v3 - picture overlay

    - by user317005
    can anyone tell me how i can put different pictures to different locations, as shown on the url below: http://connectedwell.com/wp-content/uploads/2008/05/brightkite_friendmap.png brightkite used to have it, but they dont anymore ... and im not really sure i can use custom div tags and assign them to the google map api v3 ... didnt really find anything useful in the api documentation either ... just for "custom markers"

    Read the article

  • Google map blank when used with master page

    - by asp316
    I wrote a google map lookup page. Everthing worked fine until I referenced the page to use a master page. I removed the form tag from the master page as the search button on the map page is a submit button. Everything else on my page appears but the google map div appears with map navigation controls and logo but no map visuals appear. I retested with the previous, non master page version and the map appears correctly. Any thoughts on what I'm missing?

    Read the article

  • searching map by value

    - by Mariusz Chw
    I have 2 elements (for now) map: #define IDI_OBJECT_5001 5001 #define IDI_OBJECT_5002 5002 /.../ ResourcesMap[IDI_OBJECT_5001] = "path_to_png_file1"; ResourcesMap[IDI_OBJECT_5002] = "path_to_png_file2"; I'm trying to implement method for searching this map. I'm passing string argument (file path) and method return int (key value of map) int ResFiles::findResForBrew(string filePath) { string value = filePath; int key = -1; for (it = ResourcesMap.begin(); it != ResourcesMap.end(); ++it) { if (/*checking if it->second == value */) { key = it->first; break; } } return key; } How I could check when it-second- == value, and then return that key? I would be grateful for some help. Thanks in advance.

    Read the article

  • Loading child entities with JPA on Google App Engine

    - by Phil H
    I am not able to get child entities to load once they are persisted on Google App Engine. I am certain that they are saving because I can see them in the datastore. For example if I have the following two entities. public class Parent implements Serializable{ @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Extension(vendorName="datanucleus", key="gae.encoded-pk", value="true") private String key; @OneToMany(cascade=CascadeType.ALL) private List<Child> children = new ArrayList<Child>(); //getters and setters } public class Child implements Serializable{ @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Extension(vendorName="datanucleus", key="gae.encoded-pk", value="true") private String key; private String name; @ManyToOne private Parent parent; //getters and setters } I can save the parent and a child just fine using the following: Parent parent = new Parent(); Child child = new Child(); child.setName("Child Object"); parent.getChildren().add(child); em.persist(parent); However when I try to load the parent and then try to access the children (I know GAE lazy loads) I do not get the child records. //parent already successfully loaded parent.getChildren.size(); // this returns 0 I've looked at tutorial after tutorial and nothing has worked so far. I'm using version 1.3.3.1 of the SDK. I've seen the problem mentioned on various blogs and even the App Engine forums but the answer is always JDO related. Am I doing something wrong or has anyone else had this problem and solved it for JPA?

    Read the article

  • Multiple key map in c++

    - by Morgan
    Hi, I'm wondering if any of you know of a c++ associative map container type which I can perform multiple key lookups on. The map needs to have constant time lookups but I don't care if it's ordered or unordered. It just needs to be fast. For example, I want to store a bunch of std::vector objects in a map with an integer and a void* as the lookup keys. Both the int and the void* must match for my vector to be retrieved. Does anything like this exist already? Or am I going to have to roll my own. If so, any suggestions? I've been trying to store a boost::unordered_map inside another boost::unordered_map, but I have not had any success with this method yet. Maybe I will continue Pershing this method if there is no simpler way. Thanks!

    Read the article

  • Whats the API Key for in Google Maps API V3?

    - by Brandon
    In the older version of the API, I'd have to insert the javascript into the page using something like this for just basic functionality to work: http://maps.google.com/maps?file=api&v=2&key=GoogleMapsAPIKey Where I had to configure the API key for each individual site. Looking at the documentation, it says to get a basic map working I just need this: http://maps.google.com/maps/api/js?sensor=true/false Where does the API key fit in? Do I need to worry about it if I just plan on using a basic map and marker and none of the more advanced functions?

    Read the article

  • Haskell map function with predicate

    - by Paul
    I feel like this should be fairly obvious, or easy, but I just can't get it. What I want to do is apply a function to a list (using map) but only if a condition is held. Imagine you only wanted to divide the numbers which were even: map (`div` 2) (even) [1,2,3,4] And that would give out [1,1,3,2] since only the even numbers would have the function applied to them. Obviously this doesn't work, but is there a way to make this work without having to write a seperate function that you can give to map? Filter is almost there, except I also want to keep the elements which the condition doesn't hold for, and just not apply the function to them. Thanks

    Read the article

< Previous Page | 53 54 55 56 57 58 59 60 61 62 63 64  | Next Page >