maps
API key Browser API keys cannot have referer restrictions when used with this API
It sounds like you may be making the API call server side. I ran into this issue earlier today. Since you’ve placed a referrer restriction on your API key, it will be limited to executing on the browser with the web service APIs, including the Geocoding API. It didn’t work for me even when manually … Read more
myLocationOverlay change the marker
Thx @CommonsWare, you led me in the right direction. Spent quite a wile twiddling with this. The Javadoc on http://code.google.com/android/add-ons/google-apis/reference/com/google/android/maps/MyLocationOverlay.html is just wrong (or outdated) and messes with your brain where it says: drawMyLocation Also, if the user’s position moves near the edge of the screen, and we’ve been given a MapController in our constructor, … Read more
Determine if point is within bounding box
Do just as usual: if( bb.ix <= p.x && p.x <= bb.ax && bb.iy <= p.y && p.y <= bb.ay ) { // Point is in bounding box } bb is the bounding box, (ix,iy) are its top-left coordinates, and (ax,ay) its bottom-right coordinates. p is the point and (x,y) its coordinates. This solution also … Read more
Setting max zoom level in google maps android api v2
A recent update to the Google Maps API introduces the functions you require: GoogleMap.setMaxZoomPreference() GoogleMap.setMinZoomPreference() It still does not prevent the animation from playing, though.
Letting users draw curved lines on a google map?
You can draw Bezier curves this way: var GmapsCubicBezier = function(lat1, long1, lat2, long2, lat3, long3, lat4, long4, resolution, map){ var points = []; for(it = 0; it <= 1; it += resolution) { points.push(this.getBezier({x:lat1, y:long1},{x:lat2, y:long2},{x:lat3, y:long3},{x:lat4, y:long4}, it)); } for(var i = 0; i < points.length – 1; i++) { var Line = … Read more
Convert Lat/Longs to X/Y Co-ordinates
You need more information than just a single lat/lon pair to be able to do this. At this stage, the information you have provided is missing two things: how large an area does your image cover (in terms of lat/lon)? Based on what you’ve provided, I don’t know if the image shows an area a … Read more
Convert Lat/Longs to X/Y Co-ordinates
The projection you use is going to change everything, but this will work assuming a Mercator projection: <html> <head> <script language=”Javascript”> var dot_size = 3; var longitude_shift = 55; // number of pixels your map’s prime meridian is off-center. var x_pos = 54; var y_pos = 19; var map_width = 430; var map_height = 332; … Read more