I am trying to draw a polyline between multiple coordinates using webgl earth. There is an API for drawing a polygon but I can't seem to find anything equivalent for a polyline.
Thanks for your help!
Use polygon, set 3 waypoint, A/B/A, then you get a super simple polyline !
Related
I've created an app I've used geofence I want. Show a circle on the mapbox with the same radius as the geofence. The problem is that the circle is displayed and the size of the circle changes as the map is zoomed.
You probably don't want a proper circle feature. Rather, you want a polygon with many vertices that resembles a circle. This has been answered already with ready-to-use code here: Drawing a circle with the radius in miles/meters with Mapbox GL JS
I was about to implement a polyline on my WKInterfaceMap using MKPolyline which I am using in my iOS application, but apparently apple watch doesn't have support for it.
Does anyone know some other way to do a polyline on the map using map coordinates? Thank you in advance.
WKInterfaceMap is very limited and it turns out that you cannot draw a polyline on it. You can also only draw up to 5 annotations at the same time.
Does someone knows why graphics objects such as polygon, point, picture marker and etc are rendering
from scratch while zooming or moving esri map?
For example, in the following link the brackets disappears and rendering from the start in each zoom change or map move: example.
Thanks in advance,
Gal
Yes, the graphics redraw from scratch when panning and zooming because a graphics layer has been added to the map control.
GraLay.SelectedFeature = new ags.GraphicsLayer();
map.addLayer(GraLay.SelectedFeature);
I'm creating a simple Map application in Titanium Appcelerator, right now focusing only on iOS. I have 2 Annotations specified by the latitude and longitude. I want to draw the directions between the 2 points on the Map.
I see the
mapview.addRoute();
method on the MapView object, but it requires you to input all the points in the route to draw it properly?! That doesn't sound right at all - why would it require me to find all the points when the Google Map can do that already.
Is there a way that I'm missing to simply say "here's point A, here's point B, draw the route between the 2 points on the map".
Drawing routes on the map is nothing more than a vector drawing. The same does the mapsapp on your phone.
You will have to interrogate the maps apis for directions,get the directions (points) and use it in your code to draw the route.
If you don't want to do it yourself there is a free module in the marketplace that can help
https://marketplace.appcelerator.com/apps/2580?87150712
If you want to get your hands dirty, this post might help you:
http://developer.appcelerator.com/question/74221/mobile-map-route-from-google-server
I got some problems with opengl and cocos2d. I suck with opengl i know. I was trying to find just a simple answer but no luck.
What I'm trying to do is to map a texture like this:
... so i got points
CGPoint points[4];
points[0] = ccp(x1,y1);
points[1] = ccp(x2,y2);
points[2] = ccp(x3,y3);
points[3] = ccp(x4,y4);
Whats next :( ?
All I want to do is map that texture on that polygon.
I will show it in "idiot" way :)
Firstly I would design the texture with the bottom horizontal and then rotate the sprite at the end, as this makes it a whole lot easier.
I would load the texture into a UIImage. Then use CGContexts to remove the triangular portions in the top corners.
Then load that UIImage into a CCTexture2D which I would then create a sprite from. Then rotate the sprite, so that it is at the required orientation.
Alternatively, if you don't need the texture to be generated programmatically you could just remove the corners from the texture, using gimp, photoshop or pixelmator. Then just load that texture the same way you would load any other.