B4J Question Overlapping images + text, on Google Maps markers

amorosik

Well-Known Member
Licensed User
I use jGoogleMaps to display a map and markers with the positions of some cars
For each car I have a small image that is used to display the car on the map
In addition to the position I would also like to indicate the direction of the individual cars and a text to indicate the speed and the name of the driver
So the marker should consist of: - small car image - arrow image to indicate direction - alphanumeric string to indicate speed and driver
I currently load the small car image using the function
gmap.AddMarker2 (lat, lon, "Targa =" & Targa_Auto, File.GetUri (File.DirAssets, graphic_marker))
And so I'm missing the arrow image to indicate direction, and the string image containing other information
How to "add" to the image of the car, a small arrow rotatable from 0 to 360 degrees, and then an alphanumeric string?
 

oparra

Well-Known Member
Licensed User
see anchor.

 
Upvote 0

Harris

Expert
Licensed User
In my case, the infowindow was WAY too big to show relevant data (the speed) for each marker.
Everything overlapped and you could not see anything until you zoomed in.. It was just a mess...
 
Upvote 0

oparra

Well-Known Member
Licensed User
In my case, the infowindow was WAY too big to show relevant data (the speed) for each marker.
Everything overlapped and you could not see anything until you zoomed in.. It was just a mess...

usually.
if they are vehicles, a fixed label with the data of the car plate is displayed.
or
car plate and speed.

the other data is displayed in the information windows (infowindow).
 
Upvote 0

oparra

Well-Known Member
Licensed User
By this statement, you mean a bitmap (png) for the marker "label"....?

yes, as an example the attached image

1611690241270.png
 
Upvote 0

Harris

Expert
Licensed User
Thank you very much for the help
But is the WriteOnImage.zip example related in any way to the above code?
I ask this because it seems to me quite another thing
Now, you may understand why I provided this... as a foundation to produce image markers.

I suppose one could also create bitmaps "on the fly" - affixing the required label text accordingly.
I have limited functionality with the ABMGoogleMap with regards to manipulating markers, so this works for me..
 
Upvote 0

oparra

Well-Known Member
Licensed User
Now, you may understand why I provided this... as a foundation to produce image markers.

I suppose one could also create bitmaps "on the fly" - affixing the required label text accordingly.
I have limited functionality with the ABMGoogleMap with regards to manipulating markers, so this works for me..

You're right.

The idea is to generate bitmap labels with the data you want dynamically.

Attached a demo. (tested on B4A and B4J)

The rest is up to your imagination.

Sample:
1611768755009.png
 

Attachments

  • B4J.zip
    476.4 KB · Views: 87
Last edited:
Upvote 0

Harris

Expert
Licensed User

B4J code snippet / project that creates custom text label png (map marker) files - for dynamic use...
Inspired by this thread...

Thanks
 
Upvote 0

amorosik

Well-Known Member
Licensed User

B4J code snippet / project that creates custom text label png (map marker) files - for dynamic use...
Inspired by this thread...

Thanks

Excellent for create an image from text, but how to place the image on a map (jGoogleMaps) and near or above a marker?
 
Upvote 0

Harris

Expert
Licensed User
Use the AddMarker2 method. The IconURI will point to the directory and filename of the png....
 
Upvote 0

oparra

Well-Known Member
Licensed User
Use the AddMarker2 method. The IconURI will point to the directory and filename of the png....
Excellent for create an image from text, but how to place the image on a map (jGoogleMaps) and near or above a marker?
see:
 
Upvote 0
Top