NetTalk Central

Author Topic: Cant make a Web Map to work  (Read 4228 times)

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Cant make a Web Map to work
« on: May 30, 2018, 09:26:57 AM »
Im trying to add a map to a Memory form, like it is in example web76
Ive
-set the webserver like the example
-generate the data in a memory file like the example does
no errors but the map does not shows in the page.
Looking at the source code I see the Data y the script area but the map does not shows.

Attached goes app and dct
The dct has MsSql tables but if you go to
localhost:8888/mTablero
it work ok because mTablero only use the memory file.
-----------
Regards
Alberto

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Cant make a Web Map to work
« Reply #1 on: May 31, 2018, 05:28:17 AM »
Today I decided to import de AccidentsMap proc from the web76 example to my app and it does not work either.
Theres something Im not doing in my app and it is done in the web76 app
Icant find it!
Ive read the docs and check everyting and nothing...
Please help
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Cant make a Web Map to work
« Reply #2 on: May 31, 2018, 10:30:29 PM »
Hi Alberto,

There are quite a few things wrong with this app, unrelated to maps, which I thought I'd mention because they will cause you pain later.

a) you have got the Settings control template added to the web server procedure, but then set the port number specifically to 8888. You shoud rather have these port settings set to use the SET variables, as in the attached picture, so that the control template settings are in effect. The whole point of the control template is to allow you to control these things at runtime, but then changing the template setting to be a fixed value is not ideal.

b) You've added some code to the start of the mTablero procedure to add some random data to the crm_MapData table. But this is a _really_ bad place to put this code. Remember that browses and forms are NOT procedures. They are EVENT HANDLERS. Meaning that this code will run for _every event_. If you want to create some demo/test data do it in the WebServer procedure, under a button or something.

Now on to my bugs;

1) You had the map set to use the "Current Location" as the starting position. This is fine, but exposed a bug in the JavaScript (fixed in build 10.22).

2) You had the "display marker" for starting position turned off, which in turn exposed a bug where it tried to add the marker with no icon set. That's also fixed in 10.22.

Cheers
Bruce
« Last Edit: May 31, 2018, 10:33:30 PM by Bruce »

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Cant make a Web Map to work
« Reply #3 on: June 01, 2018, 02:33:50 AM »
Thanks Bruce, regarding your warnings:

a) Ive made this app with the Web Server app wizard and this is the result. I know this is wrong but Im worried about the map and forgot to modify it.
May be you need to repair the wizard too.

b) I know this too, Ive made it for you to have all the code in one place.

Now on the bugs:

1) Ive tested the app with and without Current position and theres no difference.

2) Ive tested the app with and without Starting position and theres no difference.

With any combination, the map does not shows in the page, the javascript error message does not shows either but... as an evidence of the js error, the countdown message clock is not displayed.
-----------
Regards
Alberto