coordinates

Given a user's location, select rows that include that user in their radius

邮差的信 提交于 2019-12-31 07:03:16
问题 I have a MySQL table with rows latitude , longitude and radius . Latitude and longitude are of type DOUBLE ; radius is of type INT and measured in meters. Essentially, each row represents a circle on Earth. Given values of user_latitude and user_longitude , how can I select all the rows that include the user in their circles? I made a quick diagram to illustrate in case my question wasn't clear. Each red dot represents a user_latitude and user_longitude point, each circle represents a

Given a user's location, select rows that include that user in their radius

空扰寡人 提交于 2019-12-31 07:03:07
问题 I have a MySQL table with rows latitude , longitude and radius . Latitude and longitude are of type DOUBLE ; radius is of type INT and measured in meters. Essentially, each row represents a circle on Earth. Given values of user_latitude and user_longitude , how can I select all the rows that include the user in their circles? I made a quick diagram to illustrate in case my question wasn't clear. Each red dot represents a user_latitude and user_longitude point, each circle represents a

Google maps - draw ellipse based off 4 coordinates

情到浓时终转凉″ 提交于 2019-12-31 05:49:07
问题 I would like to draw an ellipse on google maps based off four coordinates, like the current "rectangle" method available via the API: var rectangle = new google.maps.Rectangle({ strokeColor: '#FF0000', strokeOpacity: 0.8, strokeWeight: 2, fillColor: '#FF0000', fillOpacity: 0.35, map: map, bounds: new google.maps.LatLngBounds( new google.maps.LatLng(33.671068, -116.25128), new google.maps.LatLng(33.685282, -116.233942)) }); (using the bounds paramater). If that fails, is there an easy way to

How to add text on desired coordinates on new word file using openxml

不问归期 提交于 2019-12-31 03:46:10
问题 I want to create .docx file using openxml and add text on desired coordinates(location) on each page of the file. Is there any way in openxml to adjust the text. I am using the following snippet: WordprocessingDocument doc = WordprocessingDocument.Create("E:\\test11.docx", DocumentFormat.OpenXml.WordprocessingDocumentType.Document); { MainDocumentPart mainPart = doc.AddMainDocumentPart(); mainPart.Document = new Document(); Body body = mainPart.Document.AppendChild(new Body()); Paragraph para

Post status update with location

那年仲夏 提交于 2019-12-31 01:50:08
问题 When you post a regular status update to Facebook, it tracks your current location and gives the (near) city next to the time. I.e.: May 24 near New York City, New York . Please note that this is not a check-in. I'm trying to do the same, without searching for a page (place) id and checkin. I've tried posting the coordinates with latitute and longitute, but it doesn't show the near city. https://graph.facebook.com/me/feed message=test coordinates={"latitude": 37.4163458217, "longitude": -122

GPS location on iOS and Android

旧巷老猫 提交于 2019-12-30 14:41:53
问题 I have limited experience programming Android apps and none at all for iOS. Part of a future project of mine is to make my app be able to record the current location using GPS possibly on both Android and iOS. Can the GPS coordinates be taken in "Universal Transverse Mercator" format like in Google Earth for both platforms? If not, is there some way to calculate the coordinates to this format? EDIT: Any chance anyone would know what format the functions in their respective APIs return? 回答1:

Getting magnetic field values in global coordinates

这一生的挚爱 提交于 2019-12-30 11:56:06
问题 For an Android application, I need to get magnetic field measurements across the axis of global (world's) coordinate system. Here is how I'm going (guessing) to implement this. Please, correct me if necessary. Also, please, note that the question is about algorithmic part of the task, and not about Android APIs for sensors - I have an experience with the latter. First step is to obtain TYPE_MAGNETIC_FIELD sensor data ( M ) and TYPE_ACCELEROMETER sensor data ( G ). The second is supposed to be

Select a portion of an image and retrieve its coordinates with jQuery

别说谁变了你拦得住时间么 提交于 2019-12-30 06:22:08
问题 I need a way for user to select the portion of an image either by resizing transparent rectangle or by clicking and dragging the selection area (as it's done in desktop OS), both would work for me. Then i need to retrieve the coordinates of the selected area with jQuery. Please recommend samples or tuts (if there are any), methods or API documentations sections that could help. 回答1: See Jcrop and it's demos. <!-- This is the image we're attaching Jcrop to --> <img src="demo_files/pool.jpg" id

pixel coordinates on diamond

試著忘記壹切 提交于 2019-12-30 03:10:30
问题 I got an image with a couple of diamond put side by side like on the image below The only coordinates I know on the image are the top corners (green text). When I click on the image I get the coordinates of that point, but I'm not able to get which diamond I'm on. For example I click on the red dot, how do I know that x:260, y:179 = the top diamond ? And the blue belongs to the left ? etc... Thank you very much for your help. EDIT: I finally used Canvas, but I think SVG would have worked as

How to get cells (<td>) x and y coordinate in table using jQuery?

☆樱花仙子☆ 提交于 2019-12-30 00:35:09
问题 I'm looking for a good way to get cells X-Y position in a table. (do not confuse it with css-position, I am looking for X and Y coordinate in Cartesian coordinate system). As we know, we can get particular cell in a table using ex: $('#grid')[0].rows[5].cells[7] . But, what if I want to get the value 5x7 when I click on particular cell, i.e: $('#grid td').click(function(){ alert("My position in table is: " + myPosition.X + "x" + myPosition.Y); }); I guess, the easiest way is to add innerHTML,