google-maps

Randomly generate a point within a country boundary polygon

I'm interested in pulling street view data at random within a country. I can only figure out how to generate a point within a bounding box. Often it pulls data from nearby nations. I'm using a GIS server right now, but I'm interested in removing it from the workflow since it's a pain. Anybody know of any javascript mapping API th...

Embed google map using longtitude and latitude

I would like to embed Google Map into my website, and I'm passing over 2 parameters, "longtitude" and "latitude". Any possible way the map will change according to the longtitude and latitude I sent in? For example, I put in 3.1019924,101.4804983 and click on "Search map" on maps.google.com I will get the location and the embed code. ...

Google Maps get's blurry when adding marker

We're using the Google Maps API for Flash (v1.19a) and when we add a marker to it or an overlay, the map gets blurry... would anyone have a workaround for this? ...

Putting interactive marker in google map API

I want to put a map in a web page where users will be able to put interactive marker (location pins) as many as they want. Now, whenever a marker is placed, I want to store that specified marker's lat, long value to be saved in a database that I have in my server (phpmyadmin). Trying to get started with Google Map Data API. Have seen l...

How to change the background color of GInfoWindowTab

I have the follwing code to display tabbed infowindow but i am not able to change the background color of tabs function createMarker(point, name, address, imagepath, imagelocation) { var marker = new GMarker(point, gicons[imagepath]); var image1 = imagelocation.replace(/\\/g, "/"); var m1 = image1.slice(60, 80); ...

how to get a smooth Google maps panTo() when the destination is far away

I've got two points on a google map and I want to transition between them using a smooth animation. Using the map.panTo() method I can pan to them but the animation only works if the second point is less than the width/height of the map. So the idea i've come up with is to break the transition up into something like: var destination =...

Google Maps v3 hide elements (roads, roadsigns, etc)

I found a code snippet on http://www.41latitude.com/post/1268734799/google-styled-maps: [ { featureType: "administrative", elementType: "labels", stylers: [ { visibility: "off" } ] },{ featureType: "poi", elementType: "labels", stylers: [ { visibility: "off" } ] },{ featureType: "wat...

Using tabs and MapActivitys (Android)

How can i use tabs to switch between activities? For example i have some tabs, one of them includes google map and i want each tab to have its own activity with its own .xml file. How can i do it? ...

Creating MapView with ContextMenu without Overlays

I have a mapview and i wish to display a ContextMenu when longclick but so far the closest solution i've found is here on anddev , the main reason i do not like that method is because any click activate the ContextMenu instead of a long click. Question: Is there a way to display the ContextMenu of a Map without using Overlays? Why? ...

Google Maps Api v3 - set map position in runtime

hello, how can i change position of the map, from where it is pointing now, to ie. 45.00,19.00, but in a runtime, now when map is initialsed? my application have to "jump" from some coordinates to other, so that's why i need this ability. tnx in adv! ...

After removing OverlayItem tap events still trigger

Hey guys. I have a simple overlay for a Google Map: http://pastebin.com/Rg8miMSh and I add/remove items on it depending on the zoom level. After removing/adding I call populate on the overlay and invalidate on the map view. Everything works just fine, except 1 glitch: after an item was removed, if I tap its location onTap is still trigg...

Update geocode latitude and longitude everytime address is updated.

I have this in my shop.rb: def geocode_address if !address_geo.blank? geo=Geokit::Geocoders::MultiGeocoder.geocode(address_geo) errors.add(:address, "Could not Geocode address") if !geo.success self.lat, self.lng = geo.lat,geo.lng if geo.success end end # Checks whether this object has been geocoded or not. Returns the ...

Timeout a function in JavaScript/jQuery

Hello everyone I've got the following problem: I'm using Google Maps on my site. I've attached the following eventListener to the map itself: google.maps.event.addListener(map, 'bounds_changed', scheduleDelayedCallback); The event bounds_changed is called every time someone drags the map. My Problem is, that it is called several tim...

Using JSON to ask Google Maps for a Shop

Hi to all. I am using the JSON iPhone framework v2.3.1, and I want to query Google Maps about shops, hotels, etc. It is possible to create an URL direction that gives me a list of directions? Actually I am using this Objective C code. - (void) searchCoordinatesForAddress { //Build the string to Query Google Maps. //I don't kn...

Google Maps API change default map style labels

I've developed an app using the Google Maps API (V3) and I have some custom map styles defined as described here. I can add a name on this tab quite easily by giving it a 'name' in the styledMapOptions when creating it. The problem I have is that I need the default terrain map in there but with another name/label. I was thinking I could ...

Storing data in MySQL Server Database using AJAX

I'm very new at using JS and AJAX. Currently I'm working with Google Maps API and I need to store some locations (lat,long) to the server. What I want to do is store some sort of data in my existing MySQL database in server. I have got some good example as well like the following- http://www.tutorialspoint.com/ajax/ajax_database.htm N...

Shortest route with no set destination in Google Maps V3?

So I'm just learning javascript to mess with the Google Maps API. I was wondering if anyone had an elegant solution to this problem I'm running into. A Google Maps route request must contain three things (origin, destination, and travelMode). My travelMode will always be DRIVING. The origin will always be wherever the user is located. ...

Google Maps is using javascript to render image or image files?

To use Google Maps API you fetch their api js file with: <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=set_to_true_or_false"&gt; </script> Then I use javascript on my page to interact with this API. I wonder what is going on in the background that I don't see. Is this file using javascript to rend...

Google Map API v2 - GeoCoder - how to customize a marker ?

I try to add/customize markers with Gmap V2 by using this way (example) : for (var i in table){ var myvar = table[i]['text'] ; var myaddress = table[i]['address'] ; geocoder.getLatLng( myaddress , function(point) { alert(myvar) ; // here myvar is wrong // ... adding customer markers ... ...

Google Maps user location

I wanna set up a way in which users can place a marker on the map to tell their address and i should be able to extract the lat and long and store it in the database. Is there somekinda plugin which i can modify and use ? ...