Get map image along with visible elements data - api

I can get static map images from map providers like Openstreetmap (http://wiki.openstreetmap.org/wiki/Static_map_images) and Google maps (https://developers.google.com/maps/documentation/static-maps/). I can specify zoom level, and appropriate text labels are displayed in the images; labels of country names, cities, rivers, special buildings, etc.
Now I'm looking for a way to get these images along with data describing the elements of the text labels that are visible in the image (i.e a list of elements, for this particular zoom level, in this particular area).
Would prefer not to detect the text labels using some OCR method (image bitmap analysis).
Do you know of any good way to do it? Perhaps there is some good map api for this? Thanks!

Related

Turi Create rescales and moves my object annotations coordinates

I created and merged an images SFrame with an Annotations SFrame.
I have verified that the coordinates of the annotation boxes matches the location of the features measured in Photoshop.
However the models I create are non-functional, so I explored the merged data set with
data['image_with_ground_truth'] =
tc.object_detector.util.draw_bounding_boxes(data['image'], data['annotations'])
and I find that all the annotations are squashed in the top-left corner in Turi Create despite them actually being widely distributed on the source image as in the second image. The annotations list column shows the coordinates get read correctly into TC, but are mapped badly into what the model sees as bounding boxes.
Where should I look to find the scaling problem in Turi Create??
the version of ml-annotate I was using output coordinates with different scale factors for each image in set, some close, some off by as much as 3.3x

Programmatically Draw With Measurement Widget

I'm using an ArcGIS scene with an AreaMeasurement3D widget to allow users to draw a region to provides some parameters for a db query. I would also like them to be able to type in coordinates and have the widget produce a measurement for them. I see there's a newMeasurement method available but it doesn't seem to support this. Is there some other way to programmatically draw a region with this widget?
It's not clear to me whether you want to reuse the AreaMeasurement3D widget to retrieve the actual measurements or use it to visualize the area. At this point the measurement tools do not support this.
I would suggest to use geometryEngine.geodesicArea() or geometryEngine.planarArea() to calculate a measurement from given coordinates.
Using a GraphicsLayer you could then visualize the area as shown in the Add Graphics sample.

GoogleMaps lag at a large number of markers

I apologize in advance for my English.
I have in the application of more than 5000 coordinates.
These coordinates point to the objects in all the earth.
The fact that I add all at once to the map coordinates (marker), and the map is very lag because of this!
5-6 FPS when scrolling the map.
How do I add markers for the current location (the camera), and if I scroll the map, these markers to remove, and add new to the new location (the camera).
I know there is a function idleAtCameraPosition, but how to get a list of coordinates of the array (MutableArray), which is included in the camera? How to keep track of it?
I do not understand this. Can someone already did one of you is in your project?
I hope you understand that I want to convey to you.
You might want to check Marker Clustering:
By clustering your markers, you can put a large number of markers on a map without making the map hard to read. The marker clustering utility helps you manage multiple markers at different zoom levels.
When a user views the map at a high zoom level, the individual markers show on the map. When the user zooms out, the markers gather together into clusters, to make viewing the map easier.
To have some insights about loading too many marker, try reading the article about Too Many Markers!
Some applications are required to display a large number of locations or markers. Naively plotting thousands of markers on a map can quickly lead to a degraded user experience. Too many markers on the map cause both visual overload and sluggish interaction with the map. To overcome this poor performance, the information displayed on the map needs to be simplified.
Hope this helps!

How to render text on a MKPolyline

Here is basically what I am trying to do:
1) Draw some routes on a map (Simple enough using MKPolyline and MKPolylineRenderer)
2) Label the routes (preferably repeat the label if there is room along the route)
Set Font of Text
Have Text follow the polyline's curves
I know the answer involves extending a class, but I'm not sure as to whether its MKPolyline or MKPolylineRenderer nor which method to handle it in.
If your routes are relatively static, you may have better luck creating lines and labels with something like TileMill and pre-rendering alpha-transparent raster tiles to use with an MKTileOverlay. Aside from label placement along your lines, you will also have to deal with orientation changes, collisions between labels at junctions, varying zoom levels and changing the placement of the text during the changes, etc. You could instead leverage a label symbolizer that already does this sort of thing as in TileMill.

image result for two coordinates

is there any kind of way to input the coordinates for two locations, a startpoint and a destination, and get an image result (jpeg) of a map, say google map, showing the two locations on that same image?
I need this for a vb application
thanks!
Update:
I've successfully added the image with the two locations, but there's a tiny issue,
what if the two places are too close or too far from each other, the zooming should differ, and maybe the size too, what is the best way to manipulate these, according to the coordinates given?
Yes, you can use the Static Maps API to get the map image:
https://developers.google.com/maps/documentation/imageapis/