coordinates

Google map API v3 markers overlapping

假如想象 提交于 2019-11-30 02:42:08
问题 I am making an application with google maps. When markers are overlapping only the last one is displayed even if the icons are different.. I do not want it to cluster in that case, rather it should show both maybe by changing the coordinates just a but?? Any solutions?? 回答1: I think this is a pretty elegant solution, called Spiderfying the markers. https://github.com/jawj/OverlappingMarkerSpiderfier I'm thinking of using it. What I do now is use JavaScript to make a fancy popup that hides and

How can i calculate the distance between two gps points in Java?

浪尽此生 提交于 2019-11-30 01:40:41
I used this code but it doesnt work: Need the distance between two gps coordinates like 41.1212, 11.2323 in kilometers (Java) double d2r = (180 / Math.PI); double distance = 0; try{ double dlong = (endpoint.getLon() - startpoint.getLon()) * d2r; double dlat = (endpoint.getLat() - startpoint.getLat()) * d2r; double a = Math.pow(Math.sin(dlat / 2.0), 2) + Math.cos(startpoint.getLat() * d2r) * Math.cos(endpoint.getLat() * d2r) * Math.pow(Math.sin(dlong / 2.0), 2); double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)); double d = 6367 * c; return d; } catch(Exception e){ e.printStackTrace(); }

Calculate point between two coordinates based on a percentage

ⅰ亾dé卋堺 提交于 2019-11-29 19:55:16
问题 I am looking for a function that returns a point (lat, long) between two points (where I also specify their lat, long) and that point is based on a distance percentage. So, I specify Lat1, Lon1, Lat2, Lon2 and a % on the function and, it returns a point, for example, 20% distant from the first point to the second. 回答1: Assuming the coordinate is a decimal number. You can use this equation. function midpoint(lat1, long1, lat2, long2, per) { return [lat1 + (lat2 - lat1) * per, long1 + (long2 -

Extract Images and Words with coordinates and sizes from PDF

拥有回忆 提交于 2019-11-29 19:31:57
问题 I've read much about PDF extractions and libraries (as iText) but i just haven't found a solution to extract images and text (with coordinates) from a PDF. The task is to scan PDF with catalog of products and extract each image. There is an image code printed next to each image and also a list of product codes for products that are shown on the image. I know that there is no way to extract structured info from a PDF like this but with coordinates of all image and text objects I could write

google maps, cellid to location

☆樱花仙子☆ 提交于 2019-11-29 19:28:24
According to this sample: http://www.codeproject.com/KB/mobile/DeepCast.aspx It's possible to request a gps coordinate (longitude & latitude) including range when sending cellid information (MCC, MNC, towerid, etc) Can someone tell me the actual parameter to request/post to this address? http://www.google.com/glm/mmap It could be something like this http://www.google.com/glm/mmap?mcc=xxx&mnc=xxx&towerid=xxx And i would like to know what response we would get. I have observe OpenCellid website and they provide some nice API to begin with, but i want to know about that in google map too (since

is canvas in android proportional on different devices

孤者浪人 提交于 2019-11-29 16:40:25
I am trying to make an app using canvas and a surfaceview, and I am worrying that in the future I would have many problems with it because I am not sure if the canvas is proportional with every device. currently I can only use my emulator since my phone's usb cable doesn't work(I know.. I have to get a new one..). anyways, i would like to know if the canvas would transfer my coordinates and make everything proportional, what I mean by that is that if i have something in point a, lets say (10, 10) on a device that the screen of it is 100 X 100 (this is just an example for easy calculation) it

Convert lat/long to pixel X&Y co-ordinates

依然范特西╮ 提交于 2019-11-29 15:39:47
问题 This type of question seems to have been asked numerous times but none of the solutions posted get me anywhere near the answer I need. I have this map of Northland, New Zealand and I'd like to map Lat/Long values to x/y (pixel) values on this image (http://i.stack.imgur.com/3ok4O.gif - which is 400px square) Right now I do not know the precise lat/long boundaries of this image, but I do have some example data which should be useful to someone who knows what they are doing. LAT LONG X Y -35

Click in Canvas is three pixels off

你说的曾经没有我的故事 提交于 2019-11-29 15:25:53
I've spent the whole day trying to get a click over my canvas to return the pixel xy offset. What a mission this has been! This is what I've ended up with: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>JS Bin</title> </head> <body> <script src="https://code.jquery.com/jquery-1.10.2.js"></script> <div id="logX">x</div> <div id="logY">y</div> <div style="margin-left:100px"> <div style="margin-left:100px"> <canvas id="myCanvas" width="100" height="1000" style="border:20px solid #000000;"></canvas> </div> </div> <script> var canvas = document.getElementById('myCanvas'); canvas

Convert longitude/latitude to x/y on iPhone

丶灬走出姿态 提交于 2019-11-29 14:41:03
问题 I am showing an image in an UIImageView and i'd like to convert coordinates to x/y values so i can show cities on this image. This is what i tried based on my research: CGFloat height = mapView.frame.size.height; CGFloat width = mapView.frame.size.width; int x = (int) ((width/360.0) * (180 + 8.242493)); // Mainz lon int y = (int) ((height/180.0) * (90 - 49.993615)); // Mainz lat NSLog(@"x: %i y: %i", x, y); PinView *pinView = [[PinView alloc]initPinViewWithPoint:x andY:y]; [self.view

Python - Batch convert GPS positions to Lat Lon decimals

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-29 13:40:55
Hi I have a legacy db with some positional data. The fields are just text fields with strings like this 0°25'30"S, 91°7'W . Is there some way I can convert these to two floating point numbers for Decimal Latitude and Decimal Longitude ? EDIT: So an example would be: 0°25'30"S, 91°7'W -> 0.425 , 91.116667 where the original single field position yields two floats. Any help much appreciated. fraxel This approach can deal with seconds and minutes being absent, and I think handles the compass directions correctly: # -*- coding: latin-1 -*- def conversion(old): direction = {'N':1, 'S':-1, 'E': 1,