Gmaps4rails make marker draggable and get its coordinates - ruby-on-rails-3

Is it possible to make a marker draggable and to get its coordinates in gmaps4rails, that the user could drag marker to choose the point he wants and get his chosen point coordinates?

It's not implemented in the gem.
But don't forget that you have access to all objects created. Example, the map could be retrieved with: Gmaps4Rails.map
You could take inspiration from: https://github.com/apneadiving/Google-Maps-for-Rails/wiki/Javascript-goodies

Related

SceneKit Move Camera

There is a big scene,eg:a house ,I want to use TapGes to move camera to see different rooms. Now I have two questions:
1.I can not get the 3D point from this tapPoint in the scene
Is there any other way?
Here are some examples that may help.
57018359 - this post one tells you how to touch a 2d screen (tap) and translate it to 3d coordinates with you deciding the depth (z), like if you wanted to tap the screen and place an object in 3d space.
57003908 - this post tells you how to select an object with a hitTest (tap). For example, if you showed the front of a house with a door and tap it, then the function would return your door node provided you name the node "door" and took some kind of action when it's touched. Then you could reposition your camera based on that position. You'll want to go iterate through all results because there might be overlapping or plus Z nodes
55129224 - this post gives you quick example of creating a camera class. You can use this to reposition your camera or move it forward and back, etc.

Can I cache Apple Maps?

So here is the scenario,
I am working on this piece where direction tab holding the map and there is a pin on address and callout bubble is automatically been shown as view appears. if you click button get driving directions it take user to apple maps for direction.
As this map is static I was thinking instead of download every time on when view appears, Is it possible to Cache the map, let say 1 sq Kilomerters or the area which is shown in the view.
Apple caches the map for you.
If the user will not load other map data, it will be in the cache.
You cannot force your part of the map to stay in the cache.
Edit:
I tried it with disabling wlan, so the device cannot load the map data anymore from net. It looks like it is loading, but this is more a building up ob the map data.
it shows the map data previously loaded, but cannot load new one.
No, there is no way to control the caching in MapKit. Check out the Mapbox iOS SDK or MBXMapKit.

Google Maps API v3 my map does not center on kml polygon

my problem is all in the title, I built a map with a center and zoom and I load a kml file representing a specific area according to the user's choice. It works fine, except that my map does not auto center and zoom on the loaded polygon. It zooms but only the upper part of the polygon is visible. The PreserveViewport option does not help me more as I set it to true I don't get any change as expected... Maybe is there a way to get the kml polygon's center in order to re-set the map's center ? I've browsed the web with no success. You can have a look here
Actually working, forgot tu update my css for map in order to get it show entirely. Thanks again, you saved me lots of time.

Titanium Appcelerator - Creating Directions Using a Map?

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

how to create a map base on the user coordinates?

How do I create an app that would takes map coordinates & map size enter by a user, and then draws that desired map? I looked, couldn't fine any video either. All the map tutorial show is how to create a app for your current location.
Thank
Most of the examples you've found are totally valid, you only need to provide the coordinates of the map you want to display in addition to that. That's the easy part...
It's usually as easy as
MKCoordinateRegion region = MKCoordinateRegionMake (60,0,1.5, 1.5);
[mapView setRegion: region];