News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Continuation of google maps and web control app

Started by minor28, January 30, 2014, 06:50:47 AM

Previous topic - Next topic

GoneFishing

Now it assembles fine here but the window doesn't appear on the desktop (only in the tray and ALT-TAB window)
BTW your app seems to remember last session . Where does it store its data ?

minor28

HKEY_CURRENT_USER\Software\MINOR28\Solar
comport, height, home position, current position, map type, width, winstyle, window position and zoom

minor28

#32
I have modified the Helpfunction.asm file. Now it works on my win xp. Try it on win8 please. New upload.

Edit: I forgot the exe. New upload

GoneFishing

Still the same - it sits in the tray and doesn't want to show up on the desktop

[EDIT]: ENLIGHTMENT!!!
I deleted MINOR28 key from the registry and your app started normally (one crash doesn't count though)
I terminated it and restarted again - no window . I deleted the key and it works again ( but chokes on resizing as I wrote earlier) .

[EDIT]: Now it started 5 times or so normally and crashed on zoom in :
Quote
Problem signature:
  Problem Event Name:   APPCRASH
  Application Name:   Solar.exe
  Application Version:   0.0.0.0
  Application Timestamp:   5353d811
  Fault Module Name:   Solar.exe
  Fault Module Version:   0.0.0.0
  Fault Module Timestamp:   5353d811
  Exception Code:   c0000005
  Exception Offset:   0000566c

but if I drag the map before zooming all works correctly
Street view works ok

jj2007

Quote from: minor28 on April 21, 2014, 07:37:20 AM
I have modified the Helpfunction.asm file. Now it works on my win xp.

On my XP SP3 it chokes first with "Requst failed", then with a box saying script error in MSIE, line 21, char 4, 'google' undefined, URL about:blank. continue? (Y/N)
Both choices end up with an exception for movsb as described above.

The offending line:

   google.maps.event.addDomListener(window, 'load', initMap);

Most probably, the google DOM object should have been created in
      <script type="text/javascript" src="http://maps.google.com/maps/api/src/markerwithlabel.js"></script>
but:
404. That's an error.

The requested URL /maps/api/src/markerwithlabel.js was not found on this server. That's all we know.

minor28

#35
Since I don't have win8 it is difficult to find the error. The only thing I have found is I forgot to preserve edi in one process. You can try the new upload.

If you get the "Request failed" and the script error you may not be connected to internet?

GoneFishing

It starts and runs (without registry key)
Left-border resizing still chokes it (but I don't think it's a code error)
I'm trying to resize the window because it doesn't fit my display . Both creating a fixed-sized or maximized window will let to avoid resizing.

It's getting more and more stable step by step   :t
Later today I'll look into it from under debugger

minor28

Quote
The offending line:

   google.maps.event.addDomListener(window, 'load', initMap);

Most probably, the google DOM object should have been created in
      <script type="text/javascript" src="http://maps.google.com/maps/api/src/markerwithlabel.js"></script>
but:
404. That's an error.

The requested URL /maps/api/src/markerwithlabel.js was not found on this server. That's all we know.


If one try to run the html directly outside the app you get these errors.

jj2007

Quote from: minor28 on April 21, 2014, 04:34:32 PM
Since I don't have win8 it is difficult to find the error. The only thing I have found is I forgot to preserve edi in one process. You can try the new upload.

Same as before, and on Win XP SP3.

QuoteIf you get the "Request failed" and the script error you may not be connected to internet?

Unless my system magically disconnects between two replies I am writing here, I would assume that yes, I am connected to the Internet, and that it's Google who responds with a 404 when I try to see the *.js ;-)

One remote possibility might be that the URL is not available in some countries; unlikely because would respond with a different error message. Still, what happens if you temporarily change line 8 from
http://maps.google.com/maps/api/src/markerwithlabel.js
to
http://maps.google.com/maps/api/src/nosuchsource.js ??

minor28

#39
With "http://maps.google.com/maps/api/src/nosuchsource.js" it works like before.

I have run some more on my xp and it is not so good. Flickering and so on. I skip to try to get it to work on xp.

Edit:
The code is free to use by anyone on this forum. Naturally, I am interested in what happens with the app.

jj2007

Quote from: minor28 on April 21, 2014, 05:39:21 PM
With "http://maps.google.com/maps/api/src/nosuchsource.js" it works like before.

Which indicates it doesn't anything useful...
With...
   if 0
   invoke GetLatLngStrings,addr latitude,addr longitude
   .if moving
      ;a marker is moving
      invoke wsprintf,addr buffer,ASTR("distMarkers[%d].setPosition(%s,%s);"),distMarkerIndex,addr latitude,addr longitude
      invoke ExecuteScript,addr buffer,0
   .endif
   endif

... the app stops crashing, but script errors pop up regularly, and I don't see any useful output. The crash was in the Document_OnMouseMove handler.

If I am the only one experiencing these problems, then forget. It might be an old MSIE causing this.

GoneFishing

Some new issues are found:
- ConnectGPS button area and 2 comboboxes seem to occupy the same place
- Distance measure throws an error MessageBox ; partly drawn (or periodically disappearing)  lines

minor28

#42
Quote
- ConnectGPS button area and 2 comboboxes seem to occupy the same place

All buttons are childs to a ReBar. I have set up a minimum width  to avoid this. However if you maximize and then normal size the window width was to small. This is fixed now.

Quote
- Distance measure throws an error MessageBox ; partly drawn (or periodically disappearing)  lines
I was computing numbers with thousand separators. Not good

New upload

GoneFishing

#43
If I maximize the window (and return to normal size after that) there are no more error MessageBoxes in Distance Measure mode
[EDIT]: They (Error MessageBoxes ) are still popping from time to time)
One more issue:

jj2007

"Request failed" persists but no more crashes. Several boxes complaining that elements are undefined, and no maps :(