I am new to osm and i am using mapquest open js sdk, i have done the custom map search using map.nominatimSearchAndAddLocation now i wanted to show the nearest places like hospitals,schools,hotels...etc around the placelike in mapquest . How do i do this? please help me out.

for reference i used this code

<script src="http://open.mapquestapi.com/sdk/js/v6.1.0/mqa.toolkit.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>

<script type="text/javascript">

$(document).ready(function() {

window.map = new MQA.TileMap( /*constructs an instance of MQA.TileMap*/
document.getElementById('map'), /*ID of element on the page where you want the map added*/
3, /*intial zoom level of the map*/
{lat:12.976418, lng:77.6158}, /*center of map in latitude/longitude */
'map'); /*map type (map)*/
// for zooming control
MQA.withModule('carouselcontrol','shapes','georssdeserializer','remotecollection','smallzoom', function() {
new MQA.SmallZoom(),
new MQA.MapCornerPlacement(MQA.MapCorner.TOP_LEFT, new MQA.Size(5,5))


function search_phase() {
var from = document.getElementById('fromLoc').value;//alert(from);
MQA.withModule('nominatim', function() {

/*Executes a Nominatim search and adds result to the map*/
map.nominatimSearchAndAddLocation(from, null);


<form id="getPOI">
<input type="text" id="fromLoc" name="fromLoc" value="">
<input type="button" value="Search in Map" onClick="search_phase();">

<div id='map' style='width:950px; height:625px;'></div>

asked 01 Jun '12, 09:27

Raj's gravatar image

accept rate: 0%

edited 01 Jun '12, 09:27

Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 01 Jun '12, 09:27

question was seen: 3,364 times

last updated: 01 Jun '12, 09:27

powered by OSQA