×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    May 2012
    Posts
    2

    Does anyone know a good example using the API with Heatmap based on zipcode

    Can someone answer the following please.

    I have two questions
    1) Is there a good example of how to use the api with say sales data by zip-code and then overlay it with a heatmap? How would I get the data from from say a sql database to be displayed?

    2) Is there a minimum version of Firefox and Chrome browser this API needs?

    -- Thanks

  2. #2
    Super Contributor
    Join Date
    May 2008
    Location
    Helsinki, Finland
    Posts
    1,098

    Re: Does anyone know a good example using the API with Heatmap based on zipcode

    Hi there, matn1

    For the Browser support, please have a look at this link as it is all explained and supported browsers listed are there : http://api.maps.nokia.com/en/overview.html

    What comes to the backend solution of what you were asking the backend layer is completely left up to a developer's preference.

    It should be your own app that does all the fetching the data from any storage ie nosql / sql / txt/ rest api, and feed it to the jsl.

    I could imagine that you use the jsp file to connect to a database according, run a query according to the http params i.e. ?city=helsinki and fetch the results. The you would transform them in a form that jsl understands and feed it to jsl.

    As a rough sketch: client-side page loads jsl. Invokes an xhr to the jsp page with a query param, or a POST method param and the result of this call is a dataset in a format that jsl heatmaps understand.
    Then you load the heatmap with the data.

    Hope this helps and let us know what you've been doing in this ok? =)

    Best,
    Marko
    [FONT="Comic Sans MS"][COLOR="Blue"][/COLOR][I]Marko Lumivuori
    Technical Support
    +358 40 8019330
    [email]marko.lumivuori@nokia.com[/email][/I][/FONT]

  3. #3
    Regular Contributor
    Join Date
    Aug 2011
    Location
    Berlin
    Posts
    289

    Re: Does anyone know a good example using the API with Heatmap based on zipcode

    Is there a good example of how to use the api with say sales data by zip-code and then overlay it with a heatmap?
    The standard reference example is here: http://api.maps.nokia.com/en/playgro...ueheatmap.html


    • You will need to ensure heatmaps are loaded with the library:

      Code:
      <script type="text/javascript" charset="UTF-8" src="http://api.maps.nokia.com/2.2.0/jsl.js?with=all"></script>
    • The data format you need to reproduce can be found here: http://api.maps.nokia.com/en/playgro...earthquakes.js , it makes much more sense to use lat/long and to create the data in a JS readable format, as Maveric said, you could do this with jsp on the server side:

      Code:
      var data = [
      	{ value: 4.5, latitude: -7.789, longitude: -74.622  },
      	{ value: 2.6, latitude: 37.925, longitude: -77.987 },
      	{ value: 4.8, latitude: 38.301, longitude: 141.976 }]
    • To create the heat map just add the data to the overlay

      Code:
      var heatmapProvider = new nokia.maps.heatmap.Overlay({
      		max: 20, opacity: 0.6, type: "value", coarseness: 10
      	});
      heatmapProvider.addData(data);
       display.overlays.add(heatmapProvider);


    You may also be interested in a bar chart: http://www.developer.nokia.com/Commu...h_over_the_map
    Last edited by jasfox; 2012-05-30 at 22:49.

Similar Threads

  1. Replies: 1
    Last Post: 2010-03-13, 06:39
  2. Can Speed Dial or Call log be accessed from Symbian based phone based on S60 ro S40?
    By gagan.kashyap@gmail.com in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2010-03-12, 10:36
  3. Canvas based UI library with good support...
    By KevinBoyd in forum Mobile Java General
    Replies: 19
    Last Post: 2009-11-03, 07:24
  4. How to add zipcode to contactItem manually?
    By SymbianSandy in forum Symbian
    Replies: 1
    Last Post: 2006-12-06, 06:52
  5. Location Based SMS, good...
    By pheshu in forum PC Suite API and PC Connectivity SDK
    Replies: 8
    Last Post: 2006-03-17, 07:14

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×