javiers

Active Member
Licensed User
Longtime User
Thanks for the quick response!!!

I've changed the image associated with the marker to 512x512 pixels and it looks good now. I understand this is the size marker images should be, right?
 

Star-Dust

Expert
Licensed User
Longtime User
Thanks for the quick response!!!

I've changed the image associated with the marker to 512x512 pixels and it looks good now. I understand this is the size marker images should be, right?
Yes
 

Star-Dust

Expert
Licensed User
Longtime User
Release 1.09
  • Fix bugs for LoadKML, AddMarker, AddCircle, AddPolygon, AddPolyline
  • Correct LatLng class field (Lat to Latitude, Lng to Longitude)
  • Update Sample


P.S. I started the adaptation for B4A and B4i but the management of JS is asynchronous compared to the synchronous of B4J. So you have to make several changes. It will spend some time before seeing the multi-platform version
 

Star-Dust

Expert
Licensed User
Longtime User
With version 1.9 it is no longer necessary to insert a pause (Sleep) after inserting an object

With Filtervisiblemapobjects only visible objects visible at the time inside the boud. If the room changes it must be recalled again.
With Allvisiblemapobjects all objects will be loaded on the map even if you win from visibility
 
Last edited:

Star-Dust

Expert
Licensed User
Longtime User
Inside the marker, you now have new methods to create a label and modify it. If when you modify it, put an empty text the label will be removed
 

javiers

Active Member
Licensed User
Longtime User
Hi, sorry to continue with the marker images. Since they're square (512x512), images with a different aspect ratio (e.g., rectangular) appear very distorted. And if you change the original image to 512x512, the marker becomes very small...
It's not significant, but in my case, some icons don't display visually correctly

The important thing is that the map library works very well. And thanks again for all the work you're doing!
 

Attachments

  • icons.jpg
    40.8 KB · Views: 24

Star-Dust

Expert
Licensed User
Longtime User
I can't tell you because you have this problem. It is certainly linked to Leatlef. Sometimes I do not appear to me for some reason, restart the application and works properly.
If I understand the reason I will look for a solution.
 

emexes

Expert
Licensed User
Since they're square (512x512), images with a different aspect ratio (e.g., rectangular) appear very distorted.

I don't understand this. Don't you just fit the image to your square, applying the same scale in both x and y directions?

eg if your rectangle was 3 times as wide as it is high, then you would scale it to be 512 pixels wide and (512 / 3) = 171 pixels high, and then vertically center that within the square target ie 171 down from the top of the square.

or to use what I think is your example of a problem:

start with your rectangular 71x29 marker (which I found to be either 70x28 without the black border or 72x30 with the black border, so I went with the one including the black border to make it easier to see what's happening) :



and scale that to be 512 pixels wide (ie 512x213) :



and then center that within the 512x512 pixel marker size (here using cyan as transparent) :



Obviously that image would be a lot sharper if we started from a vector or larger image rather than the 71x29 image from your example.
 
Last edited:

emexes

Expert
Licensed User
I don't understand this. Don't you just fit the image to your square,

I'm making the bold assumption that the marker images can have an alpha channel or transparent color, and that the displayed marker is not necessarily a full 512x512 square.

Like with these blue drop markers, that are clearly not squarish:



and I've just noticed they have shadows (nice touch!) and thus must have an alpha (opaqueness) channel.
 

javiers

Active Member
Licensed User
Longtime User


Yes, I'd already done the process you described to adapt the image to 512x512, but as I said, the marker image is visually small, as you can see in the image. Thanks for the replies anyway!
 

Attachments

  • icons.jpg
    43.3 KB · Views: 13

javiers

Active Member
Licensed User
Longtime User
I can't tell you because you have this problem. It is certainly linked to Leatlef. Sometimes I do not appear to me for some reason, restart the application and works properly.
If I understand the reason I will look for a solution.

Using Gemma3 (something I've never done before), he suggests this code to control the icon size... I have no idea if this can help or not. I certainly don't know how to do it!

I don't want to distract you any further with this issue. I'm sure that if there's a solution, you'll find it.

Congratulations again for this great work.

JavaScript:
var myIcon = L.icon({
    iconUrl: 'my-icon.png',
    iconSize: [32, 32], // Ancho y alto en píxeles
    iconAnchor: [16, 16], // Punto de anclaje del icono (opcional)
});

var marker = L.marker([lat, lng], {icon: myIcon}).addTo(map);
 

aminoacid

Active Member
Licensed User
Longtime User
Is it possible to display a ToolTip or InfoWindow when you hover over a Marker? This feature is available in GoogleMaps and Leaflet - Any possibility of adding it if it does not already exist (if so, I could not figure out how to do it). Thanks!

PS: The Library looks great so far. I have completely converted over my GoogleMaps application to OpenMaps and the process has been quite simple thanks to your ensuring compatibility.
 

Ralph Parkhurst

Member
Licensed User
Longtime User
Could I please add one more request?? Is it possible to add a method to edit a polygon's linecolor, linewidth and fillcolor? At the moment I do this by adding a new polygon with the required settings, and then remove the previous polygon. This gets hard to manage when you have a lot of polygons because the ID changes each time.

I agree with @aminoacid - I have now implemented jSD_OpenMaps into my app and found it very easy and straightforward to make the changes.
 

Star-Dust

Expert
Licensed User
Longtime User
I adapted an application based on the example of @klaus and written for jGoogleMap.
Of course there are still many differences and there are different methods, as I wrote before you have to be patient because I have returned to work and I can work there slowly.

I am aware of all that is missing, have patience

 
Last edited: