Search Results

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

Page 229/1144 | < Previous Page | 225 226 227 228 229 230 231 232 233 234 235 236  | Next Page >

  • Android: who can help me with setting up this google maps class please??

    - by Capsud
    Hi, Firstly this has turned out to be quite a long post so please bear with me as its not too difficult but you may need to clarify something with me if i haven't explained it correctly. So with some help the other day from guys on this forum, i managed to partially set up my 'mapClass' class, but i'm having trouble with it and its not running correctly so i would like some help if possible. I will post the code below so you can see. What Ive got is a 'Dundrum' class which sets up the listView for an array of items. Then ive got a 'dundrumSelector' class which I use to set up the setOnClickListener() methods on the listItems and link them to their correct views. DundrumSelector class.. public static final int BUTTON1 = R.id.anandaAddressButton; public static final int BUTTON2 = R.id.bramblesCafeAddressButton; public static final int BUTTON3 = R.id.brannigansAddressButton; public void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); int position = getIntent().getExtras().getInt("position"); if(position == 0){ setContentView(R.layout.ananda); }; if(position == 1){ setContentView(R.layout.bramblescafe); }; if(position == 2){ setContentView(R.layout.brannigans); Button anandabutton = (Button) findViewById(R.id.anandaAddressButton); anandabutton.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { Intent myIntent = new Intent(view.getContext(),MapClass.class); myIntent.putExtra("button", BUTTON1); startActivityForResult(myIntent,0); } }); Button bramblesbutton = (Button) findViewById(R.id.bramblesCafeAddressButton); bramblesbutton.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { Intent myIntent = new Intent(view.getContext(),MapClass.class); myIntent.putExtra("button", BUTTON2); startActivityForResult(myIntent, 0); } }); etc etc.... Then what i did was set up static ints to represent the buttons which you can see at the top of this class, the reason for this is because in my mapClass activity I just want to have one method, because the only thing that is varying is the coordinates to each location. ie. i dont want to have 100+ map classes essentially doing the same thing other than different coordinates into the method. So my map class is as follows... case DundrumSelector.BUTTON1: handleCoordinates("53.288719","-6.241179"); break; case DundrumSelector.BUTTON2: handleCoordinates("53.288719","-6.241179"); break; case DundrumSelector.BUTTON3: handleCoordinates("53.288719","-6.241179"); break; } } private void handleCoordinates(String l, String b){ mapView = (MapView) findViewById(R.id.mapView); LinearLayout zoomLayout = (LinearLayout)findViewById(R.id.zoom); View zoomView = mapView.getZoomControls(); zoomLayout.addView(zoomView, new LinearLayout.LayoutParams( LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)); mapView.displayZoomControls(true); mc = mapView.getController(); String coordinates[] = {l, b}; double lat = Double.parseDouble(coordinates[0]); double lng = Double.parseDouble(coordinates[1]); p = new GeoPoint( (int) (lat*1E6), (int) (lng*1E6)); mc.animateTo(p); mc.setZoom(17); mapView.invalidate(); } Now this is where my problem is. The onClick() events don't even work from the listView to get into the correct views. I have to comment out the methods in 'DundrumSelector' before I can get into their views. And this is what I dont understand, firstly why wont the onClick() events work, because its not even on that next view where the map is. I know this is a very long post and it might be quite confusing so let me know if you want any clarification.. Just to recap, what i'm trying to do is just have one class that sets up the map coordinates, like what i'm trying to do in my 'mapClass'. Please can someone help or suggest another way of doing this! Thanks alot everyone for reading this.

    Read the article

  • Google AJAX Transliteration API :- How do i translate many elements in page to some language at one

    - by Nitesh Panchal
    Hello, I have many elements on page and all of which i want to translate to some language. The language is not the same for all fields, that is, for 1st field it may be fr and for third field it may be en then again for 7th field it may be pa. Basically i wrote the code and it's working :- <script type="text/javascript"> //<![CDATA[ google.load("language", "1"); window.onload = function(){ var elemPostTitles = document.getElementsByTagName("h4"); var flag = true; for(var i = 0 ; i < elemPostTitles.length ; i++){ while(flag == false){ } var postTitleElem = elemPostTitles[i]; var postContentElem = document.getElementById("postContent_" + i); var postTitle = postTitleElem.innerHTML; var postContent = postContentElem.innerHTML; var languageCode = document.getElementById("languageCode_" + i).value; google.language.detect(postTitle, function(result) { if (!result.error && result.language) { google.language.translate(postTitle, result.language, languageCode, function(result) { flag = true; if (result.translation) { postTitleElem.innerHTML = result.translation; } }); } }); flag = false; } As you can see, what i am trying to do is restrict the loop from traversing until the result of previous ajax call is receieved. If i don't do this only the last field gets translated. My code works nicely, but because of the infinite loop, i keep getting errors from Mozilla to "stop executing scripts". How do i get rid of this? Also, is my approach correct? Or some inbuilt function is available which can ease my task? Thanks in advance :)

    Read the article

  • RoR - Polyline in GoogleMaps

    - by Arwed
    I'm using Ym4r and want to add a polyline to my map. This works: polyline = GPolyline.new([[27.4037755983,89.4263076782],[27.5155793659,89.3245124817]],"#ff0000",3,1.0) @map.record_init @map.add_overlay(polyline) But this doesn't: polystring = "[27.4037755983,89.4263076782],[27.5155793659,89.3245124817]" polyline = GPolyline.new([polystring],"#ff0000",3,1.0) @map.record_init @map.add_overlay(polyline) Any idea why? Regards Arwed

    Read the article

  • Use single static image as map

    - by berve
    I have a single image (a flattened out image of the world map), I want to be able to plot some coordinates in this image without having to create a map server or whatever per se, Idon't know where to begin, whats the easiest approach

    Read the article

  • Implementing a hilbert map of the internet

    - by Martin
    In the XKCD comic 195 a design for a map of the internet address space is suggested using a hilbert curve so that items from a similar IPs will be clustered together. Given an IP address, how would I calculate the 2D coordinates (in the range zero to one) that this IP is located on such a map?

    Read the article

  • In Google Chrome, how do I bring an existing popup window to the front using javascript from the par

    - by brahn
    I would like to have a button on a web page with the following behavior: On the first click, open a pop-up. On later clicks, if the pop-up is still open, just bring it to the front. If not, re-open. The below code works in Firefox (Mac & Windows), Safari (Mac & Windows), and IE8. (I have not yet tested IE6 or IE7.) However, in Google Chrome (both Mac & Windows) later clicks fail to bring the existing pop-up to the front as desired. How can I make this work in Chrome? <head> <script type="text/javascript"> var popupWindow = null; var doPopup = function () { if (popupWindow && !popupWindow.closed) { popupWindow.focus(); } else { popupWindow = window.open("http://google.com", "_blank", "width=200,height=200"); } }; </script> </head> <body> <button onclick="doPopup(); return false"> create a pop-up </button> </body> Background: I am re-asking this question specifically for Google Chrome, as I think I my code solves the problem at least for other modern browsers and IE8. If there is a preferred etiquette for doing so, please let me know.

    Read the article

  • how to use Openlayers map

    - by Ela
    I am totally confused with this openlayers map. Even there are many examples and wiki, i could not find how to reuse it. I mean i want to show my city map with managable by admin, admin can add points and locations and it should displayed in front end. Please please help me how to do it?

    Read the article

  • sef service map generation problem for sobi2 component

    - by raghu-pandiri
    Hi, We are using sef service map component and installed SEF SM SOBI2 Integrator for Joomla 1.5.x but if i enable the intigrator service map not getting generated giving a blank page.if i disable the intigrator it is generating properly for other content on the site.we have 35k + items in sobi2.is it not support for that much of records or what?

    Read the article

  • how i remove displayed icon on map

    - by sairam333
    When click on particular uesr in list and select the show map button then it show the map with an icon but this icon is not deleted from the screen it continously.but i don't want that icon for this what can i do?Thanks in advance

    Read the article

  • google maps api keys to be set webserver-wide, (as env var? inside apache?)

    - by ~knb
    I have a web site with many virtual hosts and each registered with several domain names (ending in .org, .de), site1.mysite.de, site2.mysite.org Then I have different templating systems based on several programming languages (perl and php) in use on the web server. The Google Maps Api requires a unique Google Maps api key for each vhost. I want to have something like a web-server wide variable $goomapkey that I can call from inside my code. In PHP code, Now I have a kludgy case-analysis solution like $domain = substr($_SERVER['SERVER_NAME'], -3); if (".de" == $domain){ //if ("xxxxxx" eq substr($ENV{SERVER_NAME}, 0, 5)){ // $gookey = "ABQIAAA..."; //} else { //site1.de $gookey = "ABQIAAAA1Js..."; //} } elseif ("dev" == substr($_SERVER['SERVER_NAME'], 0, 3)){ //dev.mysite.org $gookey = "ABQIAAAA1JsSb..."; } else { //www.mysite.org $gookey = "ABQIAAAA1JsS..."; //TODO: Add more keys for each virtual host, for my.machinename.de, IP-address based URL, ... } ... inside my php-based CMS. A non-ideal solution, because it is, php-only, and I still have to set it at several html templates inside the CMS, and there are too many cases. I want the google maps api key to be set by the apache web server who examines the request *early in the request loop before any php page template code is constructed and evaluated. is an environment variable a good solution? which technology should be used to set the $goomapkey variable? I'd prefer mod_perl2 Apache request handler, but the documentation is confusing (many API changes in the past ). Which Apache module could I use? Is there a built-in Apache module that does the same thing?

    Read the article

  • Good ways to map a 2D side shooter (somewhat like liero, or soldat)

    - by Blaze
    I'm wondering what way would be best to render a 2D map for a shooter (these will be static maps) similar to Soldat. Multiple options I've considered are a tile based map (stored in txt files), or just creating different classes for the different terrains I plan to use and creating a data structure to read/store them in a file. (I want to also be able to include things like jumping/running on walls, sliding down walls/slopes ect) I feel like there must be a better way than either of these, but haven't been able to find definitive information :/ Thanks :)

    Read the article

  • How to convert map to url query string?

    - by Ula Krukar
    Do you know of any utility class/library, that can convert Map into URL-friendly query string? Example: I have a map: - "param1"=12, - "param2"="cat" I want to get: param1=12&param2=cat. PS. I know I can easily write it myself, I am just surprised that I cannot find it anywhere (I checked Apache Commons so far).

    Read the article

  • Map resources when added to the project

    - by Espuz
    I have a .h when I map all the image files names and xib names with #defines. For example, if I have an image called "buttonBackground.png" I map it in my .h as #define BUTTON_BACKGROUND_PNG_FILE @"buttonBackground.png" It's possible to detect when a resource is added to the bundle and create the correspond define with a script?

    Read the article

  • Hash Table v/s STL map in C++

    - by anon
    Hi, I am trying to learn C++ maps. Was just wondering about the implementation of STL map. I read it employs Binary search tree. Is there a implementation of hash table in STL? How exactly do STL map stores Key Value pairs?

    Read the article

  • Which license do you choose for google code projects, and why?

    - by Remus Rusanu
    Starting a new project on Google code offers a choice of several licenses: Apache License 2.0 Artistic License/GPL Eclipse Public License GPL v2/v3 Lesser GPL MIT Mozilla License 1.1 New BSD License Which license do you choose, ans why? I'm also interested in opinions which license is the least restrictive license for commercial users, ie. allow commercial use of the code w/o restrictions.

    Read the article

  • How do I detect a click event on a google maps PolyLine overlay?

    - by Tom
    It seems to me that I should be able to do the following to detect a click event on a line on a google map: var line = new GPolyline( ... ); map.addOverlay(line); GEvent.addListener(line, "click", function(latlng){ alert("clicked"); }); The api reference says this is available in version 2.88, which was released in 2007(!?), so I'm assuming that's what I'm using, but I don't know how to confirm that. I also tried setting the {clickable:true} option explicitly (it's supposed to be the default.) I've tested in FireFox 3 and Opera 9.6 so doubt it's browser specific. I'm also using jQuery on the page. I have plenty of code detecting clicks on markers that works fine, clicking on lines would be really nice, can anyone enlighten me?

    Read the article

  • perl - getting a value from a map where the key has a dot

    - by imerez
    I have a map in perl which has been dumped into from some legacy code the name of the key has now changed from simply reqHdrs to reqHdrs.bla $rec->{reqHdrs.bla} My problem is now I cant seem to access this field from the map any ideas ? The following is my error Download Script Output: Bareword "reqHdrs" not allowed while "strict subs" in use

    Read the article

  • How to use OpenID+OAuth in my website?

    - by Yuan
    I want to log in my website by using google account, now i can use google account to log in(by OpenID), but i don't know how to get user account and information in google? Just like below link(which is provided by google) http://googlecodesamples.com/hybrid/ This link can log in by user's google account, and list all the documents in user's google doc, so i guess by using OAuth can let me get user's account(such as [email protected]) and get relative information, but i don't know how to do? PS. I use php to write my website

    Read the article

  • Can I create a Google calendar for a user in a hosted domain using the admin credentials

    - by user351013
    I use the admin credentials for all of my interactions with the google api and I can retrieve\create\update\delete events from and for all of my hosted domain users. However, when I go to create a calendar for a hosted domain user, the calendar is created in the admins space. In the example below the GoogleUserName does NOT match the GoogleAccount. The postUri would look similar to : http://www.google.com/calendar/feeds/[email protected]/owncalendars/full and the GoogleUserName is [email protected]. The api creates a calendar but it is in the admins space. CalendarService service = new CalendarService("Test"); service.setUserCredentials(GoogleUserName, GooglePassword); CalendarEntry calendar = new CalendarEntry(); calendar.TimeZone = "America/Chicago"; calendar.Title.Text = Title; calendar.Summary.Text = Description; calendar.Color = Color; calendar.Selected = true; calendar.Hidden = false; Uri postUri = new Uri(String.Format("http://www.google.com/calendar/feeds/{0}/owncalendars/full", GoogleAccount)); CalendarEntry createdCalendar = (CalendarEntry)service.Insert(postUri, calendar); The documentation does specify to use the users credentials however the documentation is not specific to hosted domains a great deal of the time and as such I am always attempting trial and error when trying interactions. That I can use all of the CRUD on the user's events themselves using the admin credentials leaves me to believe that it might be possible.

    Read the article

  • Description of Google map

    - by sairam333
    Hi ,I want to display the map in my application .First of all i want to know about map api key not creation .That means api key is system dependent or debugger like that please give me some answers for this .Thanks in advance

    Read the article

  • map view is struck in android

    - by Aswan
    Hi folks, i am developing android applicaiton disply user overlays on map.user values getting from webservices for disply overlays.when i tap on map and move it is calling draw method and connecting to webservices while connecting webservice and getting data my apps is struck show force close error .how can i resolve this problem

    Read the article

< Previous Page | 225 226 227 228 229 230 231 232 233 234 235 236  | Next Page >