Draw vertical line for a position in angularjs - angularjs

I want draw a line for a position on google maps. e.g. I want draw a vertical line for London city in this location 51.5072° N, 0.1275° W.
I use ionic framework and maps template. How I can draw vertical line for it?
and How I can set current location for displaying?
thank u!

You would like to draw a vertical line from London to what city? You can create a Polyline from London to another location.
If you would like to draw a line that is simply vertical, you could just specify another point in the polyline with a different longitude but same latitude as London.
For your second question, I assume that you mean setting the center of the map. Simply call setCenter(latlng) on your Map object. Details here.
EDIT:
If you want to set the user's current location as the center, use the navigator.geolocation property. Call map.setCenter() with the returned latitude and longitude. There is an example here.

Related

Leaflet custom length on polyline

Im currentyle using polylines to track the movement of something on a leaflet map.
Just for this example think about this.
I have an object with {lat, long} and when it updates it gets new atributes called {newLat, newLong}
Im drawing a polyline between this 2 points, but i want that polyline to always be the same length (lets say 100 meters).
So in that picture, the point moved from top to bottom and what im trying to achive its to keep the direction of the polyline to always be this length lets say
Any ideas on how to achieve this?

Floorplan with GPS location markers

I want to be able to display a floor plan with pan / zoom capability and overlay location markers using GPS coordinates (similar to the uber clone but with a location plan as the base rather than a map).
What would be the best avenue to explore?
You can use the location manager to get a location listener. You can use the lat/lng values from the location listener to position the image correctly using either an image viewer or manually using drawImage (from Graphics). You would need to know the latitude and longitude values corresponding to the image corners so you can position the image correctly.

Leaflet.js - How can I draw a polygon that automatically covers a group of markers?

I´m working with Leaflet.js and I have a lot of markers but I want to get a polygon drawn automatically containing a specific group of markers.
There´s an image:
Every marker has a specific radio, so if a use it, would be like this:
but I don't want that, I want an area that contains markers, I don't know how can I do that.
You might want to create a convex hull.
https://gis.stackexchange.com/questions/215137/how-to-create-a-convex-hull-with-leaflet-points:
"The easiest way to do this with javascript is to use Turf.js's convex functionality."
A working sample - http://bl.ocks.org/ebrelsford/c31f61d39d2cd559e18a

Mapping Lat And Lon on a blank page

VB.net, WPF
Been researching for a while and come across nothing that is exactly what im looking for
Basically I am required to make a program that can map area covered by a machine this map can be either be a polygon covering a white screen or a polygon overlaying an offline satellite/Street map.
I have the NMEA serial GPS setup and running perfectly however I am now required to store the Lat and lon data of the machine for each second tick and then overlay this as a polygon map for area covered.
The machine width will be set by the user and map area covered with the GPS.
My Question.
Is there a way I can overlay a gps generated coverage map on either a white screen or an offline street map?
I think I understand what you're trying to achieve here.
You can draw the coverage of your machine as a circle of machine width on a canvas. See here for a tutorial
When it comes to converting your lat/long to pixels for the centre of your machine you need to account for the projection of the chart. Lat/Long describes a location on the surface of a sphere. However your map is a flat 2d shape. To enable us to plot these points the maps are squished using a projection, the most common of which is the mercator projection
Here's an example of transforming lat / long for mercator: Covert latitude/longitude point to a pixels (x,y) on mercator projection

Custom Map Image WIndows Phone 7

I have custom map image with specific height and width.
i need to map x-y coordinates of image to latitude longitude from four corner latitude longitude available.
this requirement is for fulfill current location of user into custom image map.
more on this on image i have specific few points on image, based on current position of user, i need to find near by point on image in Windows Phone Application.
Thanks in advance.
If you are using the Bing Maps Silverlight Control for WP7, there are APIs for want you want to achieve.
The Map class for example provides methods LocationToViewportPoint and ViewportPointToLocation for converting coordinates.
There is also the class MercatorUtility which provides helpful methods like LocationToLogicalPoint and LogicalPointToLocation.
However, depending on what you mean with custom map image, nobody except you would possibly know how it maps to view coordinates.

Resources