Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It looks like your best bet at the moment would be to use the <strong>limit</strong> parameter as shown. The default is 20 places, but it can be extended to 100.</p> <pre><code> searchManager.findPlacesByCategory({ category: category, onComplete: processResults, searchCenter: searchCenter, limit: 50, }); </code></pre> <p>There is also a <strong>next</strong> URI buried in the result set, which accesses the RESTful Places API, but there doesn't appear to be any public function for processing that data yet in the 2.2.3 API.</p> <p>Here is a fully working example based on the API Explorer example: <a href="http://developer.here.net/apiexplorer/examples/api-for-js/places-search/places-search-by-category.html" rel="nofollow">http://developer.here.net/apiexplorer/examples/api-for-js/places-search/places-search-by-category.html</a></p> <p>You need to obtain your own free <a href="http://www.developer.nokia.com/Community/Wiki/How_to_Obtain_Your_Own_Nokia_appID_and_Token" rel="nofollow">app id and token</a> to get it to work.</p> <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; &lt;!-- Example from Nokia Maps API Playground, for more information visit http://api.maps.nokia.com --&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head&gt; &lt;meta http-equiv="X-UA-Compatible" content="IE=7; IE=EmulateIE9"/&gt; &lt;meta http-equiv="content-type" content="text/html; charset=UTF-8"/&gt; &lt;title&gt;Nokia Maps API Example: Search by category&lt;/title&gt; &lt;meta name="description" content="Search by category"/&gt; &lt;meta name="keywords" content="search, services, places, category"/&gt; &lt;!-- For scaling content for mobile devices, setting the viewport to the width of the device--&gt; &lt;meta name=viewport content="width=device-width, height=device-height, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/&gt; &lt;!-- By default we add ?with=all to load every package available, it's better to change this parameter to your use case. Options ?with=maps|positioning|places|placesdata|directions|datarendering|all --&gt; &lt;script type="text/javascript" charset="UTF-8" src="http://api.maps.nokia.com/2.2.3/jsl.js?with=all"&gt;&lt;/script&gt; &lt;!-- JavaScript for example container (NoteContainer &amp; Logger) --&gt; &lt;style type="text/css"&gt; html { overflow:hidden; } body { margin: 0; padding: 0; overflow: hidden; width: 100%; height: 100%; position: absolute; } #mapContainer { width: 80%; height: 80%; left: 0; top: 0; position: absolute; } #progress { width: 80%; height: 10%; left: 0; top: 80%; position: absolute; } #buttons { width: 80%; height: 10%; left: 0; top: 90%; position: absolute; } &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="mapContainer"&gt;&lt;/div&gt; &lt;div id="progress"&gt;&lt;/div&gt; &lt;div id="buttons"&gt; &lt;a onClick="search1();return false;" href="#"&gt;Find 20 Places&lt;/a&gt; &lt;a onClick="search2();return false;" href="#"&gt;Find 50 Places&lt;/a&gt; &lt;/div&gt; &lt;script type="text/javascript" id="exampleJsSource"&gt; /* Set authentication token and appid * WARNING: this is a demo-only key * please register on http://api.developer.nokia.com/ * and obtain your own developer's API key */ nokia.Settings.set("appId", "YOUR APP ID"); nokia.Settings.set("authenticationToken", "YOUR TOKEN"); // Get the DOM node to which we will append the map var mapContainer = document.getElementById("mapContainer"); // Create a map inside the map container DOM node var map = new nokia.maps.map.Display(mapContainer, { // Initial center and zoom level of the map center: [52.51, 13.4], zoomLevel: 10, components: [ new nokia.maps.map.component.Behavior() ] }); var searchCenter = new nokia.maps.geo.Coordinate(52.51, 13.4), searchManager = nokia.places.search.manager, resultSet; var resultDataJF; // Function for receiving search results from places search and process them var processResults = function (data, requestStatus, requestId) { var i, len, locations, marker; resultDataJF = data; if (requestStatus == "OK") { // The function findPlaces() and reverseGeoCode() of return results in slightly different formats locations = data.results ? data.results.items : [data.location]; // We check that at least one location has been found if (locations.length &gt; 0) { // Remove results from previous search from the map if (resultSet) map.objects.remove(resultSet); // Convert all found locations into a set of markers resultSet = new nokia.maps.map.Container(); for (i = 0, len = locations.length; i &lt; len; i++) { marker = new nokia.maps.map.StandardMarker(locations[i].position, { text: i+1 }); resultSet.objects.add(marker); } // Next we add the marker(s) to the map's object collection so they will be rendered onto the map map.objects.add(resultSet); // We zoom the map to a view that encapsulates all the markers into map's viewport map.zoomTo(resultSet.getBoundingBox(), false); } else { alert("Your search produced no results!"); } } else { alert("The search request failed"); } }; // Binding of DOM elements to several variables so we can install event handlers. var progressUiElt = document.getElementById("progress"); search1 = function(){ // Make a place search request var category = "eat-drink"; progressUiElt.innerHTML = "Looking for places in the '" + category + "' category...'"; searchManager.findPlacesByCategory({ category: category, onComplete: processResults, searchCenter: searchCenter }); } search2 = function(){ // Make a place search request var category = "eat-drink"; progressUiElt.innerHTML = "Looking for places in the '" + category + "' category...'"; searchManager.findPlacesByCategory({ category: category, onComplete: processResults, searchCenter: searchCenter, limit: 50, }); } &lt;/script&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload