I have been behind the 8-ball all quarter for my class some how I am supposed to be able to do this in 4 hours.
My Assignment
The purpose of this assignment is to utilize a map to display a route using overlays/polylines.
The goal of this assignment is to enhance the assignment from week 5 (web service to retrieve directions) to display the retrieved directions as a route on a map in addition to a list of steps.
You are required to write a single application that runs on a tablet configuration (Nexus 10 or some variation of a 10 inch screen tablet)
User Interface Requirements
The left side of the screen (ListView, left-pane) will contain the interface outlined in the week 5 assignment. A user can enter a source and destination and retrieve a list of directions based on that input. So, the interface is a couple textfields, a button, and a list.
The right side of the screen (right-pane, details view) will contain a Map that displays the directions as a segmented line (route). The map and route gets updated/displayed after the directions are retrieved (selection of the button). An initial map should be displayed with some default settings when the screen is first loaded.
Other Requirements
The Map should display the entire route (start and end point) at the appropriate zoom level (depending on the distance). The correct map type should also be used depending on the distance.
You are required to use a Marker to display the starting point and ending destination.
You are required to use the MapFragment class.
You are required to use API V2 from Google Maps and the Google Play Services API.
You are required to use the XMLPullParser class for parsing the XML.
This application will look very similar to the Google maps application that is used on the web (with a lot less detail, no zooming in out of the map, etc), concerning the route displayed, and left pane to enter source / destination and direction list.
Using Android Studio I have tried Creating an Application using the Map Activity, but it creates and application that will not compile and it looks like it wants me to use Google Keys. I can't hand in an assignment that requires Keys assigned to me.
I already have 4 hours into this and I can't even get started. I read that v3 of googles map API's doesn't need keys, but I can't find anything that tells me how to use them and Android Studio Doesn't seem to give you options as to what to download and use.
I really need help.
Related
The website (Drupal 8) needs to show a view of content records with the addresses pinned to a map of NYS. The module I used before was version 8.x.1.1 and the new one (^3.2) is vastly different.
I have used Composer to install Geocoder, Geolocation, and Geofield - but I cannot find any documentation on how to make the configuration/s work together.
I have created a content type with an Address field and a Geolocation field. I have the view/s (one block to list the records which works fine, and one block to show the map). Preferred map type is Google.
So I have 4 main issues: 1) What configuration settings should I be using for Google maps, 2) The map block needs to have the center lat/long set (I cannot find where to set it), 3) needs to be restricted to show NYS, and 4) needs to show pins for the content records in the list block.
Help Please!
On your geofield field configuration you've to set a provider as googlemaps (you've to set an api key).
In this same configuration, you have to define that your address field populate your lat/long values.
For the pins, set the view mode of your geofield to leaflet for exemple. (follow the module's instructions).
I'm using Google API for Work and has .Net available as backend (though any language is fine for logic).
Current implementation
I've a dropdown where user selects a city and Google Maps JavaScript widget alongside displays presence locations for a company in that city. If there are 10 cities, all users will always see the same visual on map for each city. However, if they zoom or move map, then its specific to the user. When user changes the dropdown. I know the latitude and longitude of all locations and are in database.
Question:
When user changes a city, I noticed there are lot of requests made to map API by widget, most of which download portions of map image and some download scripts. Are all requests counted for billing OR the there's some specific request which counts to a usage hit?
Since Google allows limited caching (but not pre-fetching), I want to cache the first request made by end user for each city (so if there are 10 cities, 10 keys) for a day. If user does zoom/move, that won't be cached. But how to achieve initial cached rendering as there are so many requests that JavaScript widget makes and where in maps widget do I hook server caching?
Thanks
I am developing GPS based Location reminder in j2me. I am little bit confuse to which maps i use??.....Google maps & Nokia maps. Which one allows me good working... The working of my app are as follows :-
-User will provide a string to app to search a place of his/her desire.
-Then according to given string app will show a place on map by pointing marker on map.
-User can save that place or he/she can select a near by place rather than searched place by clicking on map or any other way.
-app will save that searched place coordinates & remind when it reached to near that place.
-When app remind to user about already stored place... that place should show on map by pointing an marker along with the how far he is from his destination.
The real choice here lies in whether to use a RESTful API like the Google Static Maps (or Nokia's RESTful Maps) or to use a native Java ME mapping library plugin such as the Nokia Maps API for Java ME. The latter has several major advantages:
Static mapping services such as the Google Static Maps API or Nokia's
RESTful Map API do not cache or tile the images when requested,
therefore each request involves a round trip to the server. If the
map on a mobile application needs to be refreshed at any time, using
a caching library will result in a reduction in network traffic after
around three maps have been displayed. An explanation of this can be
found here
As the name implies, Google's Static Maps API can only retrieve over
http static images for a requested coordinate point, image size,
image type and zoom level. Newer libraries offer additional
functionality out of the box offering dynamic Map content and touch
support, where the user can move around his/her current position,
zoom in, zoom out, modify the view mode to satellite or translate an
address to a coordinate point and show that on the map, among others.
This abstraction of the underlying functionality is hidden from the
developer so much less coding is needed in order to achieve the same
result .
Terms and Conditions for Nokia Maps are easier to fulfil than
Google - No legal restrictions of using the API outside a web browser
application or need to provide a link to the native Google Maps App
(if there is one), or to Google Maps (if there isn't one).
Nokia currently offer higher free daily request limits. Nokia Maps
API for Java ME supports up to 50,000 render requests per day and per
unique IP address (as of January 2012), for Nokia Developer
registered users (free of charge) while the limit for Google's Static
Maps API is currently 1000 unique (different) image requests per
viewer per day.
A couple of years ago there wouldn't be a choice, only RESTful solutions existed, but these days I would say a static http solution should only be used if you want a simple single image
As an abstraction of the underlying services, there are already a full set of examples to cover most of your use cases:
-User will provide a string to app to search a place of his/her desire.
-Then according to given string app will show a place on map by pointing marker on map.
http://www.developer.nokia.com/Commu...PI_for_Java_ME
-User can save that place or he/she can select a near by place rather than searched place by clicking on map or any other way.
Maybe you need to use a draggable marker:
http://www.developer.nokia.com/Devel...ples/#standard
Or react to the touch and find a Geocoordinate:
http://www.developer.nokia.com/Commu...PI_for_Java_ME
-app will save that searched place coordinates & remind when it reached to near that place.
This is known as geofencing and is covered by the Location API:
- http://www.developer.nokia.com/Resou...ty-events.html
-When app remind to user about already stored place... that place should show on map by pointing an marker along with the how far he is
from his destination.
Showing a Map with a Marker
http://www.developer.nokia.com/Devel...ples/#standard
For distance calculations, I guess you'd be after the ROUTING example
http://www.developer.nokia.com/Devel...mples/#routing
http://www.developer.nokia.com/Commu...g_with_Java_ME
Now you could re-write and all these services from scratch using RESTful APIs (and then go about debugging your code) , but I'm sure you'll agree it would be much easier to use an existing, working and tested framework for the low level plumbing and then just write your code on top using the services.
It is possible to encapsulate RESTful service in Java ME. As an example, added below is a screenshot from an app encapsulating the suggestion service
It is just a lot easier when someone else has already done this work for you and placed it in a library.
I'm interested in adding a Google Maps feature to a program I'm writing. I would start with a historic GPS log file containing a record of my changing GPS location and date/time - for example as I drive along the road. Later on I would like to feed this log file into a windows program which would display the GPS position as a marker in the center of a Google Map that is displayed in a window on screen. The Google Map would be automatically scrolled horizontally or vertically in historic "real time" as the GPS position changed so that the marker always stays in the center of the map.
Below is a YouTube video of an existing program which already does exactly what I want, so it must be possible (it's the pane in the bottom right of the video frame)
http://www.youtube.com/watch?feature=player_embedded&v=r4rwMV7hhaY#at=840
Effectively the user would be playing-back their recorded movements in real-time from days or months ago. It would not be for tracking current movements.
I don't know much about the Google API yet, but I think that the Google maps would have to be running in a desktop program, and not on a web site.
Are there any pre-built modules which already do this (perhaps just feeding it a list of coordinates and times)?
If not, what API would I need to use to reproduce the map behavior shown in the video?
Also are there any licensing issues with doing this in a desktop program which would only be seen by 1 user rather than on a publicly available web site?
I have used the Google Maps API for creating an embedded GPS window like the one you referenced in your link, but basically it was embedding a browser window and linking it up to Google Maps. You can manage the data yourself and pump it over to the browser. This can be done locally.
You'll need to do a few things.
Define the map scripts (with an html/Javascript file). These scripts will allow you to update the location you are displaying on the map which you will hook into code side to control.
In your GUI define a browser object and set it to navigate to the html file you've made and then use the document portion of that object to invoke scripts.
You should be able to control the GPS location once you've done that. The Google Maps API is referenced in your html file. That html file is key, it will need to have all the functions you want to use to update the GPS location and display it on the map.
As per pre-built modules an/or licensing I do not know.
I'm developing a app that makes use of the Gmaps Places library and actually, I have two questions:
1) Does anyone know how long it takes to an added place(by POST request) to show up on the map? I only need it on the app's map, so I don't care if Google doesn't approve it. I've already sent the add request and received OK as response.
2) It is possible to search for markers, placed by me, as if they were places(and using radius)? Not necessarily using the Places library. I ask this to see if is possible to come with a backup plan if the waiting mentioned above is long(clients, clients...). Then I would have the places 'offline from Gmaps', mapped inside a JSON file.
If I understand you correctly, you want to combine Google's Places API with a custom location set? Without more detail I can't really tell you what the code would look like, but you'd basically want to mash up the results you get from places with your own data and place markers based on that merge. If you're searching by radius or polygon you can do a 'within bounds' search on your dataset and return any results that are within the search zone to feed into your marker creator.