Hello Yalim, I have a problem I can not solve. I implemented the component MAP exactly as the Formspider demo tutorial:


Your demo works perfectly but I think that you use as a particular numeric format:

, for thousands separator . for decimal separator

In Italy we use:

. for thousands separator , for decimal separator

So, when I enter the coordinates (latitude and longitude), the coordinates are inserted with a comma instead of the point.

When I press Put marker I get a gray screen!

If I do the same thing in your demo environment the application works properly.

I tried to change the field type in varchar2 but when the procedure calls the api_map.addmarker I get the error

ORA-06502: PL / SQL: Error: Error converting from character to number …

It is a bug or I do something wrong?

Is there a way to pass the coordinates in english/american number format to the api_map procedure?

Many Thanks!


asked 19 Jan '15, 08:43

giuseppe_polo's gravatar image

accept rate: 0%

Hi Giuseppe,

First of all, our demo application may run correctly with a small change. From FormspiderIDE "Miscellaneous" components part, double click to the "Languages" node under "Internationalization". Then define a new language definition with the correct decimal and thousand separator and make it "default". After pressing "OK" and close the languages dialog, refresh demo application and try again. This may work. (It worked in our environment. Let's see how your environment will react.)

Please see the documentation of api_map from http://theformspider.com/API/index.html. As you can see here, "addmarker" function requires number. Thus, it is not possible to use it with varchars directly. You should use some plsql utility function like "to_number" to convert your input to the desired formatted number.

Please let us know the progress.

Regards Serdar Gokcen


answered 19 Jan '15, 09:30

Serdar's gravatar image

Serdar ♦♦
accept rate: 12%

Hello Serdar, thank you very much for your fast response.

I tried to follow your instructions .. but unfortunately it does not work in my environment.

Although I imposed the decimal separator and the thousands separator like you suggested, the value that is read and returned by the api_component.getvaluenr ('mainPanel.tf_latitude') is always a number with commas (to check I put an api_application.showpopupmessage (v_latitude_nr )).

In the end, to solve the problem, I thought to change the procedure as follows:

procedures is addMarker

v_marker_id number;    v_latitude_nr number;    v_longitude_nr number;    v_zoom_nr number;    v_row_id number;


execute immediate 'ALTER SESSION SET NLS _ NUMERIC _ CHARACTERS =' '.,' '';

-- Retrieve marker parameters

v_latitude_nr: = api_component.getvaluenr ('mainPanel.tf_latitude');

v_longitude_nr: = api_component.getvaluenr ('mainPanel.tf_longitude');

v_zoom_nr: = api_component.getvaluenr ('mainPanel.tf_zoom');   

--api_application.showpopupmessage (v_latitude_nr);  

if v_latitude_nr is not null and is not null then v_longitude_nr

- Add the marker to the map

v_marker_id: = api_map.addmarker ('mainPanel.map', v_latitude_nr, v_longitude_nr, v_zoom_nr);  

- Add the marker to the grid

v_row_id: = api_datasource.createrow ('markerList1');

api_datasource.setcolumnvalue ('markerList1.markerID', v_marker_id, v_row_id);

api_datasource.setcolumnvalue ('markerList1.latitude', v_latitude_nr, v_row_id);

api_datasource.setcolumnvalue ('markerList1.longitude', v_longitude_nr, v_row_id);

end if;

execute immediate 'ALTER SESSION SET NLS _ NUMERIC _ CHARACTERS =' ',.' '';


In practice, I make an alter session changing the NLS _ NUMERIC _ CHARACTERS parameter before and after the call of api_map.

So it works perfectly! Maybe is not a good solution, but the important thing is that now everything works wonderfully well.

Thanks again,



answered 19 Jan '15, 17:13

giuseppe_polo's gravatar image

accept rate: 0%

Hi Giuseppe,

We are glad to hear that your issue is resolved.

Serdar Gokcen


answered 20 Jan '15, 06:40

Serdar's gravatar image

Serdar ♦♦
accept rate: 12%

edited 20 Jan '15, 06:40

Your answer
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



Asked: 19 Jan '15, 08:43

Seen: 2,766 times

Last updated: 20 Jan '15, 06:40

© Copyright Gerger 2017